POST
/
v1
/
oauth
/
tokens
curl --request POST \
  --url https://api.hyperline.co/v1/oauth/tokens \
  --header 'Content-Type: application/json' \
  --data '{
  "client_id": "<string>",
  "client_secret": "<string>",
  "grant_type": "authorization_code",
  "code": "<string>",
  "redirect_uri": "<string>"
}'
{
  "access_token": "<string>",
  "refresh_token": "<string>",
  "expires_in": 123,
  "token_type": "bearer"
}

Body

application/json
client_id
string
required

Application's client ID.

client_secret
string
required

Application's client secret.

grant_type
enum<string>
required

To exchange an auth code for an app access token, use authorization_code.

Available options:
authorization_code
code
string
required

The auth code received when creating the authorization.

redirect_uri
string
required

Must match the value set at the GET /authorize endpoint.

Response

200 - application/json
access_token
string
required

Access token with which you will be able to access the Hyperline API on the organisation's behalf.

refresh_token
string

Refresh token with which you will be able to retrieve a new access token on this endpoint. The refresh token does not expire.

expires_in
number
required

The number of seconds left before the app access token expires. Be sure to renew your app access token before this reaches zero.

token_type
enum<string>
required
Available options:
bearer