When I try to replace the stream tags, the replace_tags() function always returns 403: Forbidden.
This is the code I use:
class TwitchAPI(twitchio.ext.commands.Bot):
def __init__(self):
super().__init__(
token = 'abcdefghijklmnopqrstuvwxyzABCD',
prefix = '!',
initial_channels = ['xxxxxxxxxx']
)
async def event_ready(self):
print(f'Logged in as | {self.nick}')
channel = await self.fetch_channel(self.nick)
if channel is not None:
await channel.user.replace_tags(
token = 'abcdefghijklmnopqrstuvwxyzABCD',
tags = [
'c553e849-7019-479b-a14d-a78cd3462e9a',
'55afc9b3-67c9-46a0-aaad-d2fc65202f1b',
'2068d8f3-269c-43f2-9a00-82aeb3f0a3b8',
'c5247b10-deec-4d7a-84a5-db6a75cb5908',
'd81d54c8-d705-4df6-aaf0-01d715c1dbcc'
],
)
According to the documentation the token should have the channel:manage:broadcast scope. When I check my token using the https://id.twitch.tv/oauth2/validate endpoint, I get the following response:
By the looks of it you are self botting rather than using a separate Twitch account for your bot?
I recommend you join the Discord for further support as more people are likely to see your message to respond.
When I try to replace the stream tags, the
replace_tags()
function always returns 403: Forbidden.This is the code I use:
According to the documentation the token should have the
channel:manage:broadcast
scope. When I check my token using thehttps://id.twitch.tv/oauth2/validate
endpoint, I get the following response:AFAIK the token therefore has the correct scope. Any thoughts what's going wrong here?