Skip to content

Authentication

We use OAuth 2.0 Client Credentials Grant Flow to authenticate clients in our systems

Set up

Get the token by changing the following fields to the ones provided to you:

  • CLIENT_ID
  • CLIENT_SECRET
  • SCOPES

Servers

Production:  https://auth.gotabi.ai/oauth2/token
Testing:     https://test-auth.gotabi.ai/oauth2/token

Request example

curl --request POST \
  --url https://test-auth.gotabi.ai/oauth2/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data client_id={CLIENT_ID} \
  --data client_secret={CLIENT_SECRET} \
  --data scope={SCOPES}

Response example

{
  "access_token": "eyJ...sx7g",
  "expires_in": 3600,
  "token_type": "Bearer"
}

Making a call to the endpoints

With the access_token obtained in the step above, use the Authorization Header to send it.

Request example

curl -X 'POST' \
  'https://example-api.gotabi.ai/example/endpoint' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {access_token}' \
  -H 'Content-Type: application/json' \
  -d '{...}'