Webhook Not working

Highlighted
Shopify Partner
3 0 0

Hi,

I'm trying to create a new Webhook through private API. But it always return

{"errors":{"webhook":"Required parameter missing or invalid"}}

Request URL: https://apikey:password@vijay115.myshopify.com/admin/webhooks.json

Response Header

Status Code: 400 Bad Request
Connection: close
Content-Type: application/json; charset=utf-8
Date: Thu, 04 Dec 2014 12:51:28 GMT
HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT: 1/40
Server: nginx
Transfer-Encoding: chunked
X-Request-Id: 0d3b14fd-2af5-419f-a6bf-cee202329a88
X-ShardId: 3
X-ShopId: 7098295
X-Shopify-Shop-Api-Call-Limit: 1/40
X-Stats-ApiClientId: 485767
X-Stats-ApiPermissionId: 9134829
X-Stats-UserId: 0
X-XSS-Protection: 1; mode=block; report=/xss-report/0d3b14fd-2af5-419f-a6bf-cee202329a88?source%5Baction%5D=create&source%5Bcontroller%5D= admin%2Fwebhooks&source%5Bsection%5D=admin
status: 400 Bad Request
x-content-type-options: nosniff
x-ua-compatible: chrome=1

{
  "webhook": {
    "topic": "orders/create",
    "address": "http://devtech.com";,
    "format": "json"
  }
}

But It's not working. Please any one help to fix this issue.

Regards,

Vijayendran k.

0 Likes
Shopify Staff
Shopify Staff
582 0 45

You have a semicolon in your JSON. Your JSON is invalid.

0 Likes
Shopify Expert
3933 15 323

@Chris,

That is funny of you to remark. If you paid any attention to Shopify forum details, you would know that that semicolon is a longstanding bug in your forum software. You can paste perfectly valid JSON in these forums and the forum code will inject these semicolons as a decoration. 

We the people have previously pointed this out, and Shopify the company has clearly dropped the ball on fixing that issue, even though they have acknowledged it. So it lingers, like a bad fart. Like so many other loose ends.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Shopify Staff
Shopify Staff
582 0 45

Your comment isn't adding anything here. Thank you for pointing out that this is an issue with our RTE or whatever that is pasting in these semi-colons.

I've looked into our logs and didn't see anything useful. I've turned on request logging for your API client, if you can make some more attempts I might be able to see what information is coming in and where it is breaking.

Looking at your requests in the forums everything appears to be correct.

0 Likes
Shopify Partner
3 0 0

Hi Chris,

yes, I already removed the semicolon.

And also validate the request json. same error.

{"errors":{"webhook":"Required parameter missing or invalid"}}

0 Likes
Shopify Staff
Shopify Staff
582 0 45

Could you include your X-Request-Id header again? That'll help me quickly drill down to finding the request that is failing.

0 Likes
Shopify Partner
3 0 0

Sure Chris. This the last tried request Id.

X-Request-Id: bac23589-a232-44ca-bc79-968c2d6a25e0

Response: {"errors":{"webhook":"Required parameter missing or invalid"}}

Thanks,

Vijayendran k.

 

0 Likes
Shopify Staff
Shopify Staff
582 0 45

I'm not seeing your request body coming in. Are you able to configure your HTTP client to run through a proxy? A tool I've found really helpful for debugging API issues is mitmproxy. You can run that and set your HTTP client to proxy all your requests through it, and you'll see the contents of your request body.

If you could verify that your message bodies are being sent correctly that would be great.

I'm going to keep digging and talk to some colleagues about getting more information from those requests.

0 Likes
Shopify Partner
25 0 0

Hi Vijay - Did u resolve this issue?. I am seeing the same problem. Can't figure out what I am missing or is passing invalid

0 Likes
New Member
2 0 0

Hi all, is this issue resolved? Im currently getting the same error using Postman REST client and directly copying the example from the documentation:

{
  "webhook": {
    "topic": "orders\/create",
    "address": "http:\/\/whatever.hostname.com",
    "format": "json"
  }
}

I feel like this is a bug with your (Shopify) system. Please correct me if im wrong.

0 Likes