Token

Operations related to authentication token generation

Generate OAuth2 token using client credentials

post
Path parameters
account_idstringRequired

Account ID - Can be found in settings > account on the platform

Query parameters
expires_ininteger · int32Optional

Expiration time in seconds (0 for non expiration time)

Default: 0
Body
grant_typestringOptional

OAuth2 authorization type

Default: client_credentials
scopestringOptional

Needed scope (space separated) or * for all scope of the parent client.

Default: *
client_idstringOptional

Client ID

client_secretstringOptional

Client Secret

Responses
200

200

application/json
post
POST /{account_id}/token HTTP/1.1
Host: auth.flagship.io
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "grant_type": "client_credentials",
  "scope": "*",
  "client_id": "text",
  "client_secret": "text"
}
{
    "access_token": "{ACCESS_TOKEN}",
    "expires_in": 0,
    "refresh_token": "{REFRESH_TOKEN}",
    "scope": "campaign.create campaign.update campaign.toggle  env:*",
    "token_type": "Bearer"
}

Was this helpful?