Troubleshooting

Twitch Bot or Extension Stopped Working After Password or 2FA Change

Bots and extensions rely on access tokens, and a password or 2FA change can make the old ones stop working.

Is this your situation?

You changed your Twitch password or two-factor authentication settings, and now a bot or extension that worked before has stopped responding. You want to know whether the tool itself is broken.

The short answer

A password change can invalidate the access and refresh tokens a bot or extension was using to connect to your account. When a token becomes invalid, requests made with it return a 401 Unauthorized error. A new access token must be obtained using the appropriate flow for the app before it works again.

What you see, and why

SymptomCause
The bot stops posting or responding in chat right after a password change.Access and refresh tokens can become invalid if the user changes their password.
An extension shows an error or fails to load after a password or 2FA change.Access and refresh tokens can become invalid if the token expires.
A tool that worked yesterday now fails every request.API requests made with an invalid token return HTTP status code 401 Unauthorized.
The tool fails even though you never touched its settings.Access and refresh tokens can become invalid if Twitch revokes the token.

Check these first

  • Check whether the tool returns an authorization error. Look for an error in the bot console or extension log.Verify: Invalid token requests return HTTP status code 401 Unauthorized.
  • Check when the password or 2FA change happened relative to the failure.Verify: Access and refresh tokens can become invalid if the user changes their password.
  • Check if the third-party tool keeps an active OAuth session.Verify: Apps that maintain an OAuth session must call the /validate endpoint to verify the access token is still valid.

How Twitch handles this

  • Access tokens, refresh tokens, and client secrets should be treated like a password and safeguarded.
  • Access and refresh tokens can become invalid if the token expires.
  • When a token becomes invalid, a new access token must be obtained using the appropriate flow for the app.
  • Third-party apps that maintain an OAuth session must call the /validate endpoint to verify that the access token is still valid.

Which path applies to you?

  1. Did the failure start right after a password change? Access and refresh tokens can become invalid if the user changes their password.
  2. Is the tool returning a 401 error? API requests return HTTP status code 401 Unauthorized when a token becomes invalid.
  3. Is the tool missing from your connections list? Tokens can become invalid if the user disconnects the app by going to the account's connections page and clicking Disconnect next to the app's name.
  4. Has the tool reconnected but still fails? A new access token must be obtained using the appropriate flow for the app.

Step by step: finding the cause

  1. Confirm the error type the tool is reporting. Look in the bot console or extension log for an authorization error.Confirm: API requests made with an invalid token return HTTP status code 401 Unauthorized.
  2. Check the account's connections list. Open your account's connections settings.Confirm: Check the Other Connections list for the tool's name and status.
  3. Note whether the token expired on its own. Access and refresh tokens can become invalid if the token expires.Confirm: Check the tool's documentation for the token's expected lifetime.
  4. Rule out a deliberate disconnect. Access and refresh tokens can become invalid if the user disconnects the app from the connections page.Confirm: Check whether the app still appears with an active status.
  5. Rule out a Twitch-side revocation. Access and refresh tokens can become invalid if Twitch revokes the token.Confirm: Check the tool's error log for a revocation message.
  6. Get a new access token. When a token becomes invalid, a new access token must be obtained using the appropriate flow for the app.Confirm: Check that the tool's reconnection flow completes without error.
  7. Re-authorize the tool through its own sign-in flow. After getting an access token, it is used to set an API request's Authorization header.Confirm: Check that the tool resumes posting or loading normally.

Common mistakes

  • Assuming the tool is broken. You wonder why a tool that worked before now fails.Why it happens: Access and refresh tokens can become invalid if the user changes their password.
  • Treating an expired token as a permanent failure. You assume the tool can never be reconnected.Why it happens: Access and refresh tokens can become invalid if the token expires.
  • Re-entering credentials in the tool instead of reconnecting it. You type your password into the tool again, expecting that to fix it.Why it happens: A new access token must be obtained using the appropriate flow for the app.
  • Forgetting the tool was manually disconnected earlier. You blame the password change for a break that happened earlier.Why it happens: Access and refresh tokens can become invalid if the user disconnects the app from the connections page.

Quick reference

SituationWhat it means
401 Unauthorized error from the toolAPI requests return HTTP status code 401 Unauthorized when a token is invalid.
Tool stopped right after password changeAccess and refresh tokens can become invalid if the user changes their password.
Token expired naturallyAccess and refresh tokens can become invalid if the token expires.
Twitch revoked the tokenAccess and refresh tokens can become invalid if Twitch revokes the token.
Tool reconnected but still failsA new access token must be obtained using the appropriate flow for the app.
Extension-specific failureTwitch does not provide support for Extensions.
Tool safeguards its tokens poorlyAccess tokens, refresh tokens, and client secrets should be treated like a password and safeguarded.

Keeping track of who has access

Delvia helps you keep sight of the connected tools behind the access problem you diagnosed.