Curl - error 401 in follow request

I have minimum knowledge of the twitch api and am using it to try to follow a channel

This url https://github.com/justintv/Twitch-API/blob/master/v3_resources/follows.md#put-usersuserfollowschannelstarget shows an example to make a follow request. I downloaded curl for windows https://curl.haxx.se/latest.cgi?curl=win64-ssl-sspi and am giving it this command:

curl -H “Accept: application/vnd.twitchtv.v3+json” -H “Authorization: OAuth mytokenhere” -X PUT https://api.twitch.tv/kraken/users/thetokenusernamehere/follows/channels/channeltosubscribehere -k

but i am getting error 401, token invalid or missing required scope.

The token is valid so it must be missing scope. The github website shows required scope: user_subscriptions should be used. But i can’t find where should i use it. Any ideas?

The scope required is user_follows_edit not user_subscriptions. It can be requested by following one of the authentication grant flows listed here.

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