Skip to main content
POST
/
oauth2
/
token
cURL
# Encode your consumer key and secret as Base64
CREDENTIALS=$(echo -n "YOUR_CONSUMER_KEY:YOUR_CONSUMER_SECRET" | base64)

curl -X POST "https://api.swoogo.com/api/v1/oauth2/token" \
  -H "Authorization: Basic $CREDENTIALS" \
  -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" \
  -d "grant_type=client_credentials"
{
  "access_token": "{{access-token}}",
  "expires_at": "2024-11-08 16:04:40",
  "type": "bearer"
}

Authorizations

Authorization
string
header
required

HTTP Basic authentication using your base64-encoded API consumer key and secret. Only used for the POST /oauth2/token endpoint to obtain a bearer token.

Body

application/x-www-form-urlencoded
grant_type
string
default:client_credentials
required

Must be client_credentials — the only supported grant type.

Example:

"client_credentials"

Response

200 - application/json

Request API Token

access_token
string
Example:

"{{access-token}}"

expires_at
string
Example:

"2024-11-08 16:04:40"

type
string
Example:

"bearer"