Wulf2k
December 1, 2021, 10:53pm
1
Any idea why my scopes don’t include bits:read?
I’m not getting a rejection, it’s just not expanding my scope.
Powershell
$auth = (Get-ItemProperty -Path HKCU:\SOFTWARE\Wulf -Name “wulf2k”).wulf2k
$sess = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$uri = “https://id.twitch.tv/oauth2/validate ”
$headers = @{}
$body = @{}
$headers.Add(‘Authorization’, “Bearer $auth”)
$body.Add(‘scope’, ‘bits:read channel:read:subscriptions moderation:read’)
$result = Invoke-RestMethod -Uri $uri -Method Get -Headers $headers -Body $body -WebSession $sess
$result.scopes
channel:moderate
channel_editor
chat:edit
chat:read
whispers:edit
whispers:read
To get new permissions from a user, you need the target user to manually reauthenticate from the beginning.
You cannot refresh a token to get more permissions than that token originally had.
Additionally the validate endpoint is used to validate/give information about the current token. It is a read only endpoint and cannot be used to modify a token
Validate docs - get info on a token: Authentication | Twitch Developers
Refresh docs - reduce scope or maintain scope - Authentication | Twitch Developers
oAuth docs - get a new token with needed scopes - Getting Tokens: OAuth | Twitch Developers
system
Closed
December 31, 2021, 10:55pm
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.