From 12c69f479743af517ef81236e6912d503fc0abdb Mon Sep 17 00:00:00 2001 From: ramforth Date: Tue, 18 Nov 2025 01:47:39 +0100 Subject: [PATCH] oauth token mis-read --- chat_listener.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chat_listener.py b/chat_listener.py index 433da6e..6ab5c97 100644 --- a/chat_listener.py +++ b/chat_listener.py @@ -6,8 +6,12 @@ class TwitchBot(twitchio.Client): # Store our application's database user ID to avoid conflict with twitchio's internal 'owner_id' self.db_user_id = db_user_id + # Per twitchio documentation, the token must be prefixed with 'oauth:'. + # This is a common cause of silent authentication failures. + formatted_token = f"oauth:{access_token}" + super().__init__( - token=access_token, + token=formatted_token, # The client_id and client_secret are required for the client to # identify itself with Twitch's services. client_id=client_id,