Before you start
- Bango provisions DVM OAuth 2.0 credentials for your integration during the onboarding process.
- Obtain the
client_idandclient_secretfor the environment you are connecting to. - Use the token endpoint for the same environment as the DVM API you intend to call.
- Your application is responsible for requesting and managing its access tokens.
Token endpoints
Request an access token
Send an HTTPSPOST request to the token endpoint with an application/x-www-form-urlencoded body containing these fields:
Example using Sandbox:
The values in angle brackets are placeholders, not valid credentials.
Handle the token response
A successful token request returns HTTP200 OK with an access token, token type, and validity period.
The value
3599 is illustrative, not a fixed token lifetime. Use the expires_in value in each token response to calculate when that token expires.
Use the token with DVM APIs
Include the access token in theAuthorization header of requests to DVM APIs that support OAuth 2.0:
- Entitlements API
- Products and Offers API
- Consumer Offers API
- Billing Public API
- Partner Services Eligibility API
Cache and renew tokens
Cache the access token rather than requesting one for every DVM API call. Track its remaining lifetime from theexpires_in value.
- Reuse your cached token while it has at least one minute of validity remaining.
- When the remaining validity is less than one minute, request another token.
- Replace the cached token with the token returned and update its expiry information.
Handle token errors
The token endpoint returns the following HTTP errors and response codes:400 Bad Request
400 Bad Request
500 Internal Server Error
500 Internal Server Error
Test in Sandbox
- Obtain Sandbox credentials through your DVM integration setup.
- Request a token from the Sandbox OAuth 2.0 endpoint.
- Confirm that the response contains a Bearer token and
expires_in. - Call an API operation enabled for your integration with
Authorization: Bearer <ACCESS_TOKEN>. - Confirm that your application reuses its cached token and renews it before expiry.

