Channel.subscribe 403 response

Hello, I’ve created subscriptions for followers, cheers, and stream online but I keep getting a 403 response for trying to create a subscription to channel.subscribe

I have verified the token and like I said it works for everything else so far.

Does anyone know why this would be the case? Thanks.

using python 3.8.10

url = "https://api.twitch.tv/helix/eventsub/subscriptions"
  my_headers = {
    'Client-ID': CID,
    'Authorization': "Bearer " + token,
    'Content-Type': 'application/json'
  }


  data = {
    "type": "channel.subscribe",
    "version": "1",
    "condition": {
        "broadcaster_user_id": user_id
    },
    "transport": {
        "method": "webhook",
        "callback": "myarbitrarycallback",
        "secret": TWITCH_SECRET
    }
  }

Has the channel that you’re trying to listen to events for gone through your apps OAuth flow and granted you the channel:read:subscriptions scope?

That is a good question, how would I check that?

Given it 403’ed then you didn’t ask the broadcaster for permission to read their subscribers.

You need to ask user_id for permission to read their subscribers using either regular, implicit or extension install auth

So somewhere you need to have generated a user access token to read Reference | Twitch Developers

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