Generate bearer token

Bearer token is a type of access token that is used in the authentication and authorisation processes for APIs. It is a string that provides the user or system the identity to access sensitive resources or actions on a server. Bearer tokens are commonly used in the token-based authentication systems, such as OAuth2.

Generating a bearer token is essential for securely managing access to APIs, allowing for robust authentication mechanisms while maintaining a stateless, scalable architecture.

📘

Note

This section explains the process of generating the bearer token via the Postman application. You may use other platforms to generate the bearer token, if applicable.

Overview

What You'll Need

  • Postman application or account
  • API credentials from SAPIENT
  • Client ID and Client Secret

What You'll Get

  • Bearer token for API authentication
  • Token expiry information
  • Ready-to-use authentication credentials

Generating bearer token

To generate the bearer token, perform the steps as explained in the following procedure:

  • 1. Set up Postman

  • 2. Create HTTP request

  • 3. Configure Request URL

  • 4. Set Request Body Parameters

  • 5. Send Request and Get Token

Understanding response

The API returns a JSON response containing:

  • access_token: Your bearer token
  • expires_in: Token validity duration in seconds
  • token_type: Usually "Bearer"
Sample bearer token

Bearer token sample


Once the bearer token has been generated successfully, you can now use it for authentication purposes in your API requests. Include the token in the Authorization header as: Bearer [your-token-here]