Can't create/register webhook under the new Dev Dashboard "platform"

Hi, I used to have a “legacy” custom private app and I had started using the GraphQL APi to register webhooks for it in particular these two topics: CHECKOUTS_CREATE and CHECKOUTS_UPDATE.

I’m now trying to do the same under the new Dev Dashboard. And I get GraphQL userError…

I get my access token with the following scopes…

{

    "access_token": "shpat_...",

"scope": "write_checkouts,write_customers,customer_write_orders,unauthenticated_write_checkouts,unauthenticated_write_customers",

"expires_in": 86399

}

I added as my scopes as I could think of that would help…

Then I call the GraphQl mutation as I always did…

{

    "query": "mutation webhookSubscriptionCreate($topic: WebhookSubscriptionTopic!, $webhookSubscription: WebhookSubscriptionInput!) { webhookSubscriptionCreate(topic: $topic, webhookSubscription: $webhookSubscription) { webhookSubscription { id topic callbackUrl format } userErrors { field message } } }",

"variables": {

"topic": "CHECKOUTS_CREATE",

"webhookSubscription": {

"callbackUrl": "https://.../shopify-webhook/checkouts/v1/action/_create",

"format": "JSON"

}

}

}

But I get the following error…

{

    "data": {

"webhookSubscriptionCreate": {

"webhookSubscription": null,

"userErrors": [

{

"field": [

"webhookSubscription"

],

"message": "You cannot create a webhook subscription with the specified topic"

}

]

}

},

"extensions": {

"cost": {

"requestedQueryCost": 10,

"actualQueryCost": 10,

"throttleStatus": {

"maximumAvailable": 4000.0,

"currentlyAvailable": 3990,

"restoreRate": 200.0

}

}

}

}

Hi @John_Smith,

This would be expected behaviour, as the CHECKOUTS_CREATE and CHECKOUTS_ORDER webhooks requires the read_orders access scope.

I do see that you have the customer_write_orders scope (including customer_read_orders), but this access scope is specifically for the Customer Account API use. The scope you need to add to subscribe to the webhook from the Admin API is read_orders.

More info on the different access scopes available here: