Skip to content

OAuth token endpoint

Request

Accepts application/x-www-form-urlencoded or application/json.

authorization_code grant: grant_type, code, code_verifier, client_id, redirect_uri

refresh_token grant: grant_type, refresh_token, client_id

Bodyrequired
grant_typestringrequired

The grant type. Use authorization_code for desktop/CLI apps (requires PKCE), or refresh_token to refresh an expired access token.

Enum:"authorization_code""refresh_token"
codestring

The authorization code received in the redirect. Required for authorization_code grant.

code_verifierstring

PKCE code verifier. The random string used to generate the code_challenge. Required for authorization_code grant.

client_idstringrequired

The client_id returned during client registration. Required for both grant types.

redirect_uristring

Must match the redirect_uri used in the authorization request. Required for authorization_code grant.

refresh_tokenstring

The refresh token from a previous token response. Required for refresh_token grant.

resourcestring

RFC 8707 resource indicator. If sent, must match the resource from the authorization request.

curl -i -X POST \
  https://api-dashboard.influencers.club/public/v1/oauth/token/ \
  -H 'Content-Type: application/json' \
  -d '{
    "grant_type": "authorization_code",
    "code": "string",
    "code_verifier": "string",
    "client_id": "string",
    "redirect_uri": "string",
    "refresh_token": "string",
    "resource": "string"
  }'

Responses

Bodyapplication/json
access_tokenstringrequired

Bearer token for authenticating API requests.

refresh_tokenstringrequired

Token used to obtain a new access token when the current one expires.

token_typestringrequired

Always Bearer.

expires_inintegerrequired

Lifetime of the access token in seconds.

scopestringrequired

Space-separated list of scopes granted to this token.

Response
{ "access_token": "string", "refresh_token": "string", "token_type": "string", "expires_in": 0, "scope": "string" }