Skip to main content

Twitch

Read Twitch channels, streams, clips and videos through the Helix API.

Connect it with: API key. Twitch's own documentation: https://dev.twitch.tv/docs/authentication/validate-tokens/.

What agents can do​

Connect Twitch so the agents working your tasks can reach it. With it connected, they can:

  • Look up channels, users and whether a stream is live, with its title, game and viewer count.
  • List a channel's recent videos, clips and schedule.
  • Search categories and channels.
  • With a user token and the matching scopes, update the connected channel's title or category.

Before you start​

  • A Twitch account with two-factor authentication on, and an application registered in the Twitch developer console (dev.twitch.tv/console).
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with Twitch​

Jaah connects to Twitch with an API key, not with a sign-in button.

Connect with an API key​

Find each value first:

  • Client ID: dev.twitch.tv/console > Applications > your application > Manage > Client ID. Register one under Register Your Application if you have none.
  • Access token: A token minted for that same application: an app access token from the client credentials grant (POST id.twitch.tv/oauth2/token), or a user token from the Twitch CLI command twitch token -u -s followed by the scopes agents need, such as channel:read:subscriptions. Paste the token alone, without OAuth or Bearer.

Then add it to Jaah:

  1. In Jaah, open Secrets, select New, and pick the Twitch card.
  2. Name the secret and choose who can use it.
  3. Fill in Client ID, Access token.
  4. Select Save. Jaah tests the secret straight away (see Test the connection).

Jaah encrypts what you type and never shows it again — not to you, and not to an admin.

Use your own OAuth app​

Not used: Jaah connects to Twitch with an API key, not through an OAuth app.

Test the connection​

Select Test on the secret. Jaah calls Twitch's API once (GET https://id.twitch.tv/oauth2/validate) with the stored values, and shows who it answered as, or which value Twitch refused and the status it answered. Jaah also tests automatically when you save or reconnect.

The last result and its time stay on the secret's page, so you can see whether it still works without testing again.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A key connection hands the agent its fields: client_id, access_token.

Tell the agent in your task description which secret to use, for example “use the Twitch secret org/twitch”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at Twitch once the test passes. Steps: Replace or delete a secret.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Twitch's side too, revoke or delete the key at Twitch.

Limitations​

  • Twitch access tokens expire (app tokens after about 60 days, user tokens after about 4 hours unless refreshed). Jaah does not renew a pasted token: replace it when the Test fails.
  • What agents can do is bounded by the token's scopes; an app access token reads public data only.
  • Helix applies a per-app rate limit (about 800 points a minute); a busy agent can hit it.
  • Agents can do only what the connected Twitch account allows.

Troubleshooting​

Test says Twitch rejected the access token (401)

The token expired or was revoked. Mint a new one for the same application and select Replace on the secret.

Test fails: the access token belongs to another client ID

The token was minted for another application. Mint it with this secret's Client ID, or change the Client ID to the token's application.

An agent gets 401 Client ID and OAuth token do not match

The token was minted for another application. Mint it with this secret's Client ID, or change the Client ID to the token's application.

An agent gets 401 Missing scope

The user token lacks the scope that call needs (for example channel:manage:broadcast). Mint a new token with it.

Still stuck? Select Test and read the result: it names the value Twitch refused and the status it answered.

FAQ​

App token or user token?

An app token for public data such as streams and clips; a user token when agents must act on your own channel.

Does the Test call Helix?

No. It calls Twitch's free token check, which also tells Jaah the token's application and login.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one Twitch account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.