How to request and use an API token

Obtaining credentials

Before getting started, you'll need to request API credentials from your Brazen account manager. This client_id/client_secret combo is needed to obtain the OAuth tokens required for all subsequent Brazen API calls.

Obtaining a token

To obtain a token, place a POST request to https://api.brazen.com/core/v1/oauth2/token with the following x-www-form-urlencoded data:

keyvalue
grant_typeclient_credentials
client_id{your client_id}
client_secret{your client_secret}

Example token request

$ curl -X POST https://api.brazen.com/core/v1/oauth2/token \
    --data "grant_type=client_credentials" \
    --data "client_id=dinoco-prod" \
    --data "client_secret=123xyz"

Example token response

{
  "token_type": "bearer",
  "access_token": "18d96d2984a346f3831617e653280f1c",
  "expires_in": 3600
}

Making an authenticated API call

Simply attach the bearer token to any API call as an Authorization header and you're ready to make authenticated API calls!

Example API request with bearer token

$ curl https://api.brazen.com/core/v1/events/dinoco-networking \
    -H "Authorization: Bearer 18d96d2984a346f3831617e653280f1c"

Did this page help you?