Create Token
POST. https://auth.druo.com/oauth/token
Generates a new OAuth token request.
This endpoint returns an OAuth token with a duration of 86400 seconds (24hrs) along with scope.
Remember to make responsible use of the tokens generated, bearing in mind the duration of each token.
Request Body
client_id
string
REQUIRED
The ID of the Client.
Example value: ojT6MnDHwqCJDcfTIbmy
client_secret
string
REQUIRED
The secret Key of the client.
Example value: 5qmRkW64QELGZrv0MTq7IKj9aCIbLT
audience
string
REQUIRED
The API you want to have access to.
Value: https://druo-merchant-api.com
grant_type
string
REQUIRED
The type of access you want to get.
Value: client_credentials
curl --location 'https://auth.druo.com/oauth/token' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "{{client_id}}",
"client_secret": "{{client_secret}}",
"audience": "https://druo-merchant-api.com",
"grant_type": "client_credentials"
}'
Response Fields
access_token
string
The OAuth token.
Value: eyJhbGciOiJSUzI1NiIsInR.....
scope
string
The permissions the access token has.
Value: read:connect write:transaction
expires_in
string
The expiration time in seconds since the token was generated.
Value: 86400
token_type
string
Token Type.
Value: Bearer
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6I.....",
"scope": "read:connect write:connect read:payments write:payments read:accounts write:accounts ",
"expires_in": 3600,
"token_type": "Bearer"
}