Skip to content

[Bug]: Error fetching a token for connecting to the server: #83727

@VelhoDoido

Description

@VelhoDoido

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

None of the queried intents (chat) are known by the auth provider.
Please add one of these to the user you want to connect with using
the addIntentToUser method or the additional parameter to addUser or addUserForToken.

"3:32 PM
Same error persisting:

"None of the queried intents (chat) are known by the auth provider."
The refresh token and auth provider are now working fine — "Added user 1495493130 to RefreshingAuthProvider" and "automatic token refresh enabled" are both good signs. But the plugin is still failing because the token doesn't have the chat intent registered with it internally.

This is a bug in the plugin's code — it's not calling addIntentToUser for the chat scope after adding the user to the provider. This is an OpenClaw plugin issue, not a config issue on your end.

Your best path forward is to report this on the OpenClaw GitHub or Discord. The error message is very specific and actionable for the developers:

Error fetching a token for connecting to the server:
None of the queried intents (chat) are known by the auth provider.
Please add one of these to the user you want to connect with using
the addIntentToUser method or the additional parameter to addUser or addUserForToken.
In the meantime, check if there's a newer version of the plugin:

powershell
openclaw plugins update @openclaw/twitch
Or check the current installed version:

powershell
Get-Content "$env:USERPROFILE.openclaw\extensions\twitch\package.json" | ConvertFrom-Json | Select-Object name, version
This looks like a known @twurple library integration bug that the plugin maintainer needs to fix."

Steps to reproduce

teps to reproduce
Install @openclaw/twitch plugin version 2026.5.7 (local extension at ~/.openclaw/extensions/twitch)
Configure openclaw.json with a valid Twitch bot account using username, accessToken (with oauth: prefix), clientId, clientSecret, and refreshToken
Run openclaw gateway
Observe Twitch channel connection attempt

Expected behavior

The Twitch channel connects and remains connected, as the credentials are valid (confirmed via POST https://id.twitch.tv/oauth2/validate returning HTTP 200 with chat:read, chat:edit, and user:read:chat scopes for the configured user).

Actual behavior

The channel exits immediately after reporting "Connected to Twitch as Velho_AI" with the error:
Error fetching a token for connecting to the server: None of the queried intents (chat) are known by the auth provider.
Please add one of these to the user you want to connect with using the addIntentToUser method or the additional parameter to addUser or addUserForToken.
The channel then enters an infinite retry loop with exponential backoff, reset periodically by the health monitor. The gateway never establishes a stable Twitch connection.

OpenClaw version

OpenClaw version 2026.5.7 (eeef486)

Operating system

Windows 10/11

Install method

npm global install, launched via openclaw gateway

Model

Model google/gemini-3.1-pro-preview (thinking=medium, fast=off)

Provider / routing chain

Provider / routing chain Google / Gemini direct

Additional provider/model setup details

Plugin loaded as a non-bundled local extension from C:\Users\USER.openclaw\extensions\twitch\dist\index.js. plugins.allow is not set. RefreshingAuthProvider is used when clientSecret and refreshToken are provided; StaticAuthProvider is used when only accessToken and clientId are provided. Both auth provider paths produce the same fatal error. Token validated externally as having chat:read, chat:edit, user:read:chat scopes.

Logs, screenshots, and evidence

[twitch] Added user 1495493130 to RefreshingAuthProvider for Velho_AI
[twitch] Using RefreshingAuthProvider for Velho_AI (automatic token refresh enabled)
[twitch] Set up handlers for Velho_AI:VelhoDoido
[twitch] Connected to Twitch as Velho_AI
[channels/twitch] [default] channel exited without an error
[twitch] Error fetching a token for connecting to the server: None of the queried intents (chat) are known by the auth provider.
Please add one of these to the user you want to connect with using the `addIntentToUser` method or the additional parameter to `addUser` or `addUserForToken`.


Token validation response:
client_id  : gp762nuuoqcoxypju8c569th9wz7q5
login      : velho_ai
scopes     : {chat:edit, chat:read, user:read:chat}
user_id    : 1495493130
expires_in : 0

Impact and severity

Affected: All users of the @openclaw/twitch plugin attempting to connect a bot account to a Twitch channel
Severity: Blocks workflow entirely — Twitch channel integration is non-functional
Frequency: Always reproduces with valid credentials
Consequence: Bot never joins the channel; failed onboarding for new users; infinite retry loop consuming resources

Additional information

The error message references addIntentToUser from the @twurple/auth library. The plugin appears to add the user to the RefreshingAuthProvider without specifying the chat intent, causing all subsequent token fetches for chat to fail. Last known good version: unknown (never successfully connected on this install). First known bad version: 2026.5.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions