Token

Generates an API authentication token using the provided API credentials.

Unique resource name: api_authentication.v1.token

This endpoint authenticates an API keys by validating the provided API credentials. Upon successful authentication, an access token is generated and returned.

Authentication Process:

  • The app-id and x-api-key headers must contain valid credentials.
  • If authentication is successful, a signed JSON Web Token (JWT) is issued.
  • If authentication fails due to invalid credentials, a 401 Unauthorized response is returned.

Security Considerations:

  • The API key (x-api-key) should be kept confidential.
  • The generated JWT should be used for subsequent authenticated requests.
get/api/v1.0/authentication/Token

Request

  • Base URL: https://sandbox.sparefinancial.sa
  • URL: https://sandbox.sparefinancial.sa/api/v1.0/authentication/Token
  • Auth: none declared. Required headers: app-id, x-api-key

Headers

app-idstring required

The unique identifier of the API keys.

x-api-keystring required

The API key associated with the API keys.

Response

Successfully generated an API authentication token.

typestring nullable
access_tokenstring nullable
expires_ininteger
refresh_tokenstring nullable
refresh_expires_ininteger

Changes

No recorded changes to this operation across all 1 revision of this API.