Obtain an Access Token

POST {{baseUrl}}/oauth/token?grant_type=authorization_code&code={{code}}&scope={{scope}}&redirect_uri={{redirect_uri}}

Once the client application has the Authorization code, then the client application can obtain an Access Token. The Access Token will contain vital information that is required to access the BGL API.

Request Params

KeyDatatypeRequiredDescription
grant_typestring[REQUIRED] the value of this should always be: authorization_code for initial authorization
to refresh the token, the value of this should always be: refresh_token
codestring[REQUIRED] The Authorization Code obtained from the BGL API. This is not required to Refresh an Access Token
scopestring[REQUIRED] Must be a scope registred to your application. Currently available scopes are listed in the API Scopes.
redirect_uristring[REQUIRED] The URI that will be used to redirect after authorisation. This value must match one of the defined OAuth 2.0 Redirect URLs in your application configuration. See Obtaining BGL API Credentials on how to set redirect uri.

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

"{ access_token: \"df2f0e40-606f-4311-8066-590732fd126b\" token_type: \"bearer\" refresh_token: \"c50a429f-9a6d-449d-8d82-4817798fe27b\" expires_in: 581977 scope: “audit” }\n"