Articles in this section
Category / Section

How to generate Access Token from User Management Server using Bold BI REST API?

Published:

Bold BI REST API endpoints are protected by OAuth 2.0. To access REST API services protected by OAuth 2.0, you need to obtain an access token. This access token acts as a key that grants permission to access the protected resources.


Get Client Credentials

To obtain the access token, you need the client id and secret. Please follow the below steps to get the client id and client secret.
  1. Navigate the following page in the UMS -> Settings -> API Keys.
    Administration page in Bold BI user management server with API Keys sectionAdministration page in User Management Server with API Keys section
    Note: You can use the following URL - https://{your_domain}/ums/administration/api-keys to access the page directly.
    
  2. You can obtain the Client ID and the Secret from this page.
    API Keys page in user management server with client id and client secretAPI Keys page in User Management Server with Client Id and Client Secret

Generate Access Token

  1. You can get the access token using the following API endpoint.
    {base url}/api/token
    METHODPOST
    URL/api/token
    Access Token API endpoint in PostmanAccess Token API endpoint in Postman

  2. Include the following parameters in the body of the request:

    grant_type: client_credentials

    client_id: your client ID

    client_secret: your client secret

    You will also need to include the appropriate headers for the API, such as

    Content-Type: application/x-www-form-urlencoded.

    Content-Type header included with the POST request
    Parameters included with the POST request for access tokenParameters included with the POST request for an access token


  3. You can now get an access token using the API, and a status of 200 denotes a successful retrieval of the access token.
    Access token generated in the response in PostmanAccess token generated in the response

  4. For any subsequent API requests, please include the access token in the Authorization header. This access token is valid for 60 minutes from the time it is generated.
    Post request to add a new user to user management server passing authorization header in postmanPost request to add a new user to the user management server passing authorization header

Related Links



Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SG
Written by Sivabalan Ganesan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied