Token Endpoint
POST
/oidc/token
const url = 'https://auth.timetonic.com/oidc/token';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ grant_type: 'authorization_code', code: 'example', redirect_uri: 'example', code_verifier: 'example', refresh_token: 'example', client_id: 'example', client_secret: 'example' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://auth.timetonic.com/oidc/token \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data grant_type=authorization_code \ --data code=example \ --data redirect_uri=example \ --data code_verifier=example \ --data refresh_token=example \ --data client_id=example \ --data client_secret=exampleExchange an authorization code or refresh token for OIDC tokens. Supports grant_type=authorization_code (with PKCE) and grant_type=refresh_token.
Request Bodyrequired
Section intitulée « Request Bodyrequired »Media typeapplication/x-www-form-urlencoded
object
grant_type
required
string
code
string
redirect_uri
string
code_verifier
string
refresh_token
string
client_id
string
client_secret
string
Responses
Section intitulée « Responses »Token response
Media typeapplication/json
object
access_token
string
token_type
string
expires_in
integer
refresh_token
string
id_token
string
scope
string
Example
{ "token_type": "Bearer"}OAuth error (invalid_request, invalid_grant, etc.)