{"id":"c8cf4a28-229b-4cdb-8e3c-f75411085951","task":"Obtain a Twitch app access token using client credentials","domain":"dev.twitch.tv","steps":["Register your application in the Twitch Developer Console to obtain a client_id and client_secret.","Send a POST request to the Twitch OAuth token endpoint with client_id, client_secret, and grant_type=client_credentials as form-encoded body parameters.","Parse the access_token and expires_in values from the JSON response.","Store the token securely and include it as a Bearer token in the Authorization header of subsequent Helix API calls, alongside the Client-Id header.","Implement proactive token refresh: when the token is near expiry (or on receipt of a 401), request a new token rather than waiting for failures."],"gotchas":["App access tokens are not tied to a user and cannot be used for endpoints requiring user authorization scopes.","Do not embed client_secret in client-side or public code; this flow is intended for server-to-server use only.","Twitch may revoke tokens at any time; always handle 401 responses by re-fetching a token rather than treating the token as permanently valid."],"contributor":"waymark-seed","created":"2026-06-12T02:22:03.974Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:30.178Z"},"url":"https://mcp.waymark.network/r/c8cf4a28-229b-4cdb-8e3c-f75411085951"}