I have the right scope, I am authenticating correctly with my own app which is set up, as far as I can tell, under my main twitch account, LeRurik. This is the same account that I am querying followers for. The follower count matching suggests that its the correct account.
Any idea why I would not be getting the data?
The usual suggestion is that either the scope is missing, or that the authenticated user is not a mod on the channel. But how can I not be a mod of my own channel?
I have been trying to investigate this for a few hours now and am starting to get a bit frustrated, so any help would be appreciated.
To read whom follows who via the API requires a USER TOKEN not a Client Credentials token
Requires a user access token that includes the moderator:read:followers scope. The ID in the broadcaster_id query parameter must match the user ID in the access token or the user must be a moderator for the specified broadcaster. If a scope is not provided, only the total follower count will be included in the response.
It’s probably just late and I am not thinking clearly, but…
If I use the GrantType::AUTHORIZATION_CODE to get the access token at login, I then can’t actually log in the user. I also can’t get their display name/avatar for the user area because for that I would need their username or ID in the first place, which there doesn’t seem to be an endpoint for getting the user details for the current oauthed user?
I was able to successfully get the access token for myself by logging into my own site as myself, but it kind of defeats the purpose if I can’t get the rest of the info to go with it, as the code is one use only.
Sorry if this seems to be asking for too much help here, but I don’t see how I can do both flows with one code (create a user and get their access token), nor how I can only get the access token for my own account, as I don’t need or care about getting one for other users.
I have removed the sensitive information, but as you can see, I requested the additional scopes, but the access token that was returned states that it only has the user:read:email scope? Does that sound right, or is something still going wrong there?