# Webhook Subscription

**URL:** <https://forum.inductiveautomation.com/t/webhook-subscription/112240>\
**Category:** Ignition\
**Tags:** vision, scripting\
**Created:** [November 17, 2025, 8:03pm UTC](https://forum.inductiveautomation.com/t/webhook-subscription/112240 "2025-11-17T20:03:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![levi.medeiros](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@levi.medeiros](https://forum.inductiveautomation.com/u/levi.medeiros)\
**Post date:** [November 17, 2025, 8:03pm UTC](https://forum.inductiveautomation.com/t/webhook-subscription/112240/1 "2025-11-17T20:03:52Z")

</div>

I’m trying to replicate the functionality of the attached payload subscribe.py file using ignition.

[Payload Subscribe.py](https://forum.inductiveautomation.com/uploads/short-url/76AqUtn8MlKZMD0wrCOKnZZ2wdL.py) (2.5 KB)

I create a button in vision to replicate the subscription to web events. It calls this function:

```python
def subToWebEvent():
    # Post data to the web service in JSON format.
    # This allows you to use the 'data' object in the Python Resource.
    
    projectName = "MyProject"
    folderName = "testServer"
    doPostName = "postjson"
    
    my_ip_address = "192.168.20.209"
    fleet_ip = "192.168.20.110"
    fleet_authentication = "mir_GjX6dSiBJCrWCGDY1QTVeQUNpv93Yp5Sv5Ya9HqUL1oOgKlyvHhgpYM6PeOGVpxRNwYf2I"
    my_ip_and_port = my_ip_address + ":8090"
    
    # SUBSCRIBE AGAIN
    HEADERS = {
        'accept': 'application/json',
        'x-api-key': fleet_authentication,
        'Content-Type': 'application/json'
    }
    
    params = {
        "base-url": "http://" + my_ip_and_port+"/system/webdev/samplequickstart/Test",
        "endpoints": [
            {
                "event-type": "Subscription",
                "endpoint-paths": [
                    "/WebhookTest"
                ]
            },
            {
                "event-type": "Payload",
                "endpoint-paths": [
                    "/WebhookTest"
                ]
            }
        ]
    }
    
    jsonParams = system.util.jsonEncode(params)
    print(jsonParams)
    client = system.net.httpClient()
    response = client.post(
        'http://192.168.20.110/api/v1/subscription',
        headers=HEADERS,
        data=jsonParams
    )
    print("POSTED")

```

Then I added a folder in web Dev containing a webhook test doPost handler:

[doPost.py](https://forum.inductiveautomation.com/uploads/short-url/fIbyU4zknGaubtJbV5euWMqpiFZ.py) (82 Bytes)

I can see in Wireshark that the POSTs from the MiR webhook are getting rejected with error 405. I replicated the payload using postman to insure the webhook test address was correct and it handled the payload correctly. What have I done wrong?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 17, 2025, 11:22pm UTC](https://forum.inductiveautomation.com/t/webhook-subscription/112240/2 "2025-11-17T23:22:35Z")

</div>

> [@FastAPI POST endpoint returning "Field required" when sending dictionary from Jython](https://forum.inductiveautomation.com/t/fastapi-post-endpoint-returning-field-required-when-sending-dictionary-from-jython/111141/11):
>
> Try this, because some servers are bad at negotiating HTTP\_2 downgrades. Make this call: client = system.net.httpClient() Into: client = system.net.httpClient(version="HTTP\_1\_1")

---

<div class="post-metadata">

**Author:** ![levi.medeiros](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@levi.medeiros](https://forum.inductiveautomation.com/u/levi.medeiros)\
**Post date:** [November 18, 2025, 4:09pm UTC](https://forum.inductiveautomation.com/t/webhook-subscription/112240/3 "2025-11-18T16:09:41Z")

</div>

Hi Paul,

I’m having trouble with the ignition webpage receiving the POST request from the external server. Sending the POST to subscribe to the webhook works and returns 200. Its my process web event that is rejecting the response

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/6/f6978a439a314dea35b2ec09e19a8c88cd0db99c.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/b/2b014cb8b7f71a6b0e13ae960810d033df36095d.png)
