I’m having a similar problem as @cowhome where using app token (all we have) is what’s in the docs, but it doesn’t work.
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.
From Postman:
GET /helix/webhooks/subscriptions HTTP/1.1
Host: api.twitch.tv
Client-ID: [XXX]
Cache-Control: no-cache
Response:
{
"error": "Unauthorized",
"status": 401,
"message": "Must provide valid app token."
}
This Client-ID is used elsewhere and works
I tried Cowhome’s solution but with response as: Must provide a valid Client-ID or OAuth token
Dist
October 17, 2018, 6:12pm
2
As per the docs: https://dev.twitch.tv/docs/api/reference/#get-webhook-subscriptions
Authentication
App access token
You have to supply an app access token as the Authorization
header, ie Authorization: Bearer <App Token>
1 Like
Thanks. My request is now
GET /helix/webhooks/subscriptions HTTP/1.1
Host: api.twitch.tv
Authorization: Bearer [XXX]
Cache-Control: no-cache
and response is
{
"error": "Unauthorized",
"status": 401,
"message": "Must provide a valid Client-ID or OAuth token"
}
Dist
October 17, 2018, 6:46pm
4
Are you sure you’re using an App Access Token? Using a client ID or User Access Token wont work.
Oh, my mistake. I was unaware App Access != Client Id. Thank you.
For anybody else, here’s the doc:
Authentication
Dist
October 17, 2018, 7:03pm
6
Yeah, that’s why I linked to the page on how to get an app access token. Client ID’s can be public, which is why they are not sufficient to access this endpoint or otherwise you could easily see not only what webhooks other people are subscribed to, but their callback URL for the topic too, which is why App access tokens are required as they are private, and no one but the app owner should have access to them.
1 Like
system
Closed
November 16, 2018, 7:03pm
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.