Can't register a webhook: Required parameter missing or invalid

Highlighted
New Member
2 0 0

Hi everyone, first time poster here. I've got a lot working with the API with no problems, but I need to register a webhook, and keep getting the "Required parameter missing or invalid" error. I've followed all of the instructions, but maybe I've missed something. 

URL: https://bil-test-store.myshopify.com/admin/webhooks.json

Method: POST

Headers: Content-Type: application/json 
X-Shopify-Access-Token: mytokengoeshere

Body: 

(Body content type application/json)

{"webhooks": 
    {
      "topic": "products/update",
      "address": "https://mysite.co/hooks/shopify/products/update",
      "format": "json"
    }
}

I can validate that the token is good, as if I change anything there I first get the error of invalid token, so it's something with a missing parameter...buy I have NO idea what I am missing. I googled around here and stackoverflow and have found no substantive answers. Any clues on what's missing??

0 Likes
Shopify Staff
Shopify Staff
971 6 130

It looks like you have `webhook` pluralized at the top level. You're meant to be creating a single webhook, not an array of them. In this case, `webhook` is the missing or invalid required parameter.

1 Like
New Member
2 0 0

Ha, how did I miss that? That worked. Thank you. Hangs head in shame, walks away. 

0 Likes
Tourist
11 0 1

I'm actually getting this as well - but not on all stores, only some... can't seem to create any webhook associations - and also injecting script tags- but let's start with this first...

{"webhook":{"topic":"customers\/create","address":"https:\/\/our_site.com\/hooks\/DYNAMIC_ID\/customers\/created","format":"json"}}

response from shopify:

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

Is there any way to get some help on this?

 

0 Likes
Tourist
11 0 1

@shopify - just in case you needed a ping for the above ^^ 

0 Likes
Shopify Staff
Shopify Staff
971 6 130

Hey there.

Can you share an x-request-id I can look at? You'll have received one in the response headers.

0 Likes
Tourist
11 0 1

Hey Alex, thanks for responding. I was able to figure this out yesterday late... it had to do with me making requests to the actual store domain, not the 'secure_url' and the redirects not working correctly with CURL... so I think the key is to make sure that the secure url is being used at all times, not the domain. 

That would be pretty accurate right?

0 Likes