Get access token

Exchange client credentials for a Bearer token using the OAuth 2.0 client_credentials flow.

Body·
required
application/json

OAuth 2.0 client credentials request

  • client_id
    Type: string

    Your API client ID

  • client_secret
    Type: string

    Your API client secret

  • grant_type
    Type: string

    Must be client_credentials

Responses
  • application/json
  • 401

    Invalid client credentials

Request Example for post/v1/oauth/token
curl https://public-api.somewhatok.link/v1/oauth/token \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "client_id": "",
  "client_secret": "",
  "grant_type": "client_credentials"
}'
{
  "access_token": "string",
  "token_type": "string",
  "expires_in": 1
}

Grand Public API