token that needs to be included in all request headers made to the API.
To obtain the client_id and client_secret, please create an app first.
To make calls on behalf of a user you have to obtain an access_token. To do this, first send the user to https://simkl.com/oauth/authorize to receive a code, then post it in JSON format to https://api.simkl.com/oauth/token. The response contains the access_token.
STEP 1 β Authorize (simkl.com)
Open a URL like the one below in the userβs browser or a Custom Tab (do not use a WebView on mobile):
redirect_uri with ?code=... appended (and &state=... if you sent one).
Build this URL against
https://simkl.com β not https://api.simkl.com. The API host has no /oauth/authorize page.STEP 2 β Exchange code for token (api.simkl.com)
POST the code to https://api.simkl.com/oauth/token with your client_id, client_secret, redirect_uri, and grant_type=authorization_code.
Both content-types and both credential locations work. Simklβs For library-specific examples (Python, Node, Java, Go, PHP), see OAuth client libraries β most are zero-config.
POST /oauth/token accepts:Content-Type: application/x-www-form-urlencoded(the RFC 6749 Β§3.2 default) orContent-Type: application/jsonβ pick whichever your HTTP client prefers- Client credentials in the request body (
client_id+client_secretparameters) or in theAuthorization: Basicheader (RFC 6749 Β§2.3.1) β both paths are honored
access_token:
expires_in is 5 years in seconds β effectively infinite for any realistic session. Thereβs no refresh_token; Simkl tokens are long-lived and the API has no refresh-token grant. If a 401 arrives before that lifetime elapses, the user revoked your app at Connected Apps settings β restart the flow from STEP 1.
The authorization
code is single-use. As soon as you POST it to /oauth/token, the server deletes it β even if the exchange fails (network error, validation mismatch, etc.). If your exchange fails for any reason, donβt retry with the same code β restart from STEP 1.Same user, same token. If the same user runs the OAuth flow twice for your app β whether via the standard flow, PKCE, or PIN β Simkl returns the same
access_token both times (it increments an internal usage counter but doesnβt rotate the token). Storing the latest response is safe; you donβt need to invalidate older tokens of your own because there arenβt multiple ones.See also
Choose a flow
Per-platform recommendations, code samples, comparison across all three flows.
Public PKCE
The variant for mobile, SPA, browser extensions, and desktop binaries β same browser UX, no
client_secret required.PIN flow
The alternative for TVs, consoles, watches, CLIs, and media-server plugins β no
client_secret and no redirect required.GET /oauth/authorize
Endpoint reference β every accepted query parameter, including PKCE.
POST /oauth/token
Endpoint reference β body fields, response shape, error codes, interactive playground.