Can't use get webhook subscriptions endpoint

I noticed that a new endpoint has appeared recently for getting a list of webhook subscriptions: https://dev.twitch.tv/docs/api/reference/#get-webhook-subscriptions

Every time I try to use this I get an unauthorized message back:

curl -H 'Client-ID: <client id that works for other stuff>' -X GET 'https://api.twitch.tv/
helix/webhooks/subscriptions'
{"error":"Unauthorized","status":401,"message":"Must provide valid app token."}

Anyone got any ideas what might be going on?

Thanks in advance.

The response already told you whats wrong.
The endpoint requires you to pass in an app access token
(https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#oauth-client-credentials-flow)

1 Like

Thanks, I’ll give it a try, although the example in the documentation uses the client-id, not an app token:

curl -H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-X GET 'https://api.twitch.tv/helix/webhooks/subscriptions?first=10&after=eyJiIjpudWxsLCJhIjp7IkN1cnNvciI6IiJ9fQ'

Getting a app access token does work, so the example in the documentation could do with updating to use Authorized: Bearer <token> rather than Client-ID.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.