Home
Release Notes
Home
Release Notes
Linkedin
  1. Authentication
  • Baladâ„¢ Gateway Documentation đŸ“–
  • Get Started
  • Authorization
  • Responses
  • Go Live!
  • FAQs
  • APIs
    • Authentication
      • Token
        POST
    • Core
      • Exchange rate
        • Exchange Rates
      • Balance
        • Get Current Balance
      • Secrets
        • Generate Secret
        • Delete Secret
        • Get Secrets
    • Link
      • Sandbox Testing Guide
      • Error Codes
      • Transaction Lifecycle V2
      • Lookups
        • Purposes List
        • Sources List
        • Banks List
        • Relations
      • Transactions
        • Create transaction
        • Update transaction
        • Cancel transaction
        • Get transaction status V2
        • Transactions List
        • Export Transactions List
        • Calculate receiving amount
        • Validate Account
      • Reconciliation
        • Reconciliation
  • Webhooks
    • Link.Transaction.StatusUpdateV2
  1. Authentication

Token

POST
/identity/v1/token

Request#

This API is intended to allow the Partner to authenticate and obtain an access token from B. The Partner sends their client_id and client_secret (using grant_type: client_credentials) to B's token endpoint. B validates these credentials and, if successful, returns a Bearer access_token, token_type, and expires_in. This access token must be included in the Authorization header (e.g., Authorization: Bearer ) for all subsequent API calls to B's protected resources.

Request Body#

This request uses the x-www-form-urlencoded body type.

Response#

The response for this request is a JSON object with the following properties:
access_token (string): The access token for the identity verification.
token_type (string): The type of token.
expires_in (integer): The duration for which the token is valid.
scope (string): The scope of the token.

Request

Header Params

Body Params application/x-www-form-urlencoded

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://gateway-sandbox.balad.tech/identity/v1/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=xxxx-xxx-xxx-xxxx-xxx' \
--data-urlencode 'client_secret=xxxxxxxxxxxxxxxxxxxxxxxxx'

Responses

đŸŸ¢200Success
application/json
Bodyapplication/json

Example
{
    "access_token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "token_type": "Bearer",
    "expires_in": 3600,
    "scope": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
đŸŸ 400Invalid Client
Previous
FAQs
Next
Core
Built with