OAuth 2.0 client credentials must be obtained from the API Client Auth screen in Databridge Pro. The following credentials are provided when an API Client record is created:
-
Client id
-
Client secret
-
Scope
-
Authorization URL (token generation).
See Managing API Client Authorization in Databridge Pro Help for details.
These client credentials are used to obtain OAuth 2.0 access tokens that authorize requests to the API service noted within the scope.
Get an API token
To get an OAuth 2.0 token:
-
Make a POST request to the Authorization URL (token) endpoint.
-
Include the following parameters:
-
grant_type=client credentials
-
client_id=YOUR_CLIENT_ID
-
client_secret=YOUR_CLIENT_SECRET
-
scope=SCOPE_FROM_FILE
-
-
Include the following header:
-
Content-Type=application/x-ww-form-urlencoded
-
-
After making the call, the server will respond with a json object containing:
-
access token
-
token type
-
expiration timeframe (seconds)
-
Using the API token
Once an access token is obtained:
-
Include it in the Authorization header of your API request.
-
The token is only authorized to access the API service indicated within the scope.
If the token is being used within the StandardOauth2AccessTokenProvider service in
Databridge Pro, the Client Authentication Strategy must be set to BASIC_AUTHENTICATION.
Token Expiration
Access tokens typically expire after a set period. Applications should request new tokens before expiration to maintain uninterrupted access.