Obtain an app access token using the client credentials flow by POSTing to the Twitch token endpoint with client_id, client_secret, and grant_type=client_credentials.
Look up the game's ID by calling the Get Games endpoint with the game name as a query parameter, or use a known game_id directly.
Call the Get Streams endpoint (/helix/streams) with game_id as a query parameter, along with your desired first (page size, up to 100) value.
Include the app access token in the Authorization header (Bearer YOUR_TOKEN) and your client_id in the Client-Id header.
Parse the data array for stream objects (user_name, viewer_count, title, etc.) and use the pagination.cursor value in an after parameter for subsequent pages.
Known gotchas
Both the Authorization header (Bearer token) and the Client-Id header are required on every Helix request; omitting either returns a 401 error.
App access tokens do not represent a user and cannot access user-specific endpoints requiring OAuth user authorization.
Stream results reflect a snapshot and can shift rapidly; avoid heavy caching when freshness matters.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp