Authentication & Access Tokens

Introduction

Effective token management is critical for secure and efficient API interactions. Passport's API uses an OAuth2 authentication model, ensuring that you can securely authenticate and authorize API requests. This guide provides a structured overview of how to generate, manage, and revoke access tokens.

Bearer Authentication

Bearer authentication (also known as token authentication) is an HTTP authentication scheme that uses security tokens: specifically, bearer tokens. The idea is simple: if you have the token, you're granted access. That’s why it’s called “bearer” the one who bears the token gets access.

Bearer tokens are typically long, random strings generated by the server after a successful login or authorization request. Once you have a token, you must include it in the Authorization header when making requests to protected endpoints:

JSON
Copy

Authentication Flow

  1. Register as an Entity: You must register on the Passport platform.
  2. Obtain API Keys: After registration, you receive a Client ID (API Key) and Client Secret (API Secret).
  3. Generate an Access Token: Use these keys to request an access token, which grants system-wide API access.

API Endpoints for Token Management

Generate a Access Token

DefinitionDescription
Endpointhttps://bre-b-sandbox.api.visionamos.passportfintech.com/v1/iam/oauth/tokens
MethodPOST
HeadersAccept-Language, Content-Length, Content-Type: application/json
AuthenticationClient Credentials (API Key and API Secret)

Request Body Parameters

ParameterTypeDescription
client_idStringYour API Key (Client ID) issued during registration.
client_secretStringYour API Secret (Client Secret) required for authentication.
grant_typeStringMust be set to client_credentials to generate a token.

Example of Request

JSON
Copy
Access Token Creation

Access Token Creation

Example of Response

The expected HTTP response body is 200 OK with the follow response body:

Response
Access Token
Copy

The Developer Access Token is valid for 24 hours (86,400 seconds).

Best Practices for Token Management

  • Use short-lived tokens: Renew tokens periodically to enhance security.
  • Store credentials securely: Never expose API keys or tokens in client-side code.
  • Rotate API keys periodically: Regularly update keys to prevent unauthorized access.

Next Steps

Now that you understand how to generate and manage access tokens in Passport, you can proceed with:

  • Integrating your credentials into Postman or your development environment.
  • Using the generated token to authenticate calls to the platform's various endpoints.
  • Exploring the available flows in our Postman collection and detailed endpoint documentation.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard