Skip to main content

Authentication using Auth Token

Description

Before making a call to Confirm API, it is necessary to generate an auth token using the Confirm API Key and Secret (password) that you set up in the user dashboard as part of the account setup.

Production Endpoint URL: https://api.cpaas.symphony.rakuten.net/auth/v1/token

Methods: GET

HTTP Headers

ParameterRequiredValue
AuthorizationYType: Basic
Username: API Key
Password: Secret
AcceptYapplication/json

Token Generate

Response

If Successful, the API call will respond with an HTTP 200 OK with a JSON payload

ParameterDescription
account_idAPI Key that was sent in request
productTWOFA
jwt_tokenThis token should be passed in the Authorization header of any subsequent calls to the SMS API. Token expiration period is 15 minutes, and the expiration period will be provided as part of the API response.
token_valid_untilThe "token_valid_until” timestamp gives an indication of when the token will expire in YYYY/MM/DD HH:mm:ss format.

It is good practice to ensure that your application generates a new token shortly before this time to be used by subsequent API calls to avoid any authentication failure due to expired credentials.

Sample Response

{
"account": {
"account_id": "...Confirm API Key...",
"product": "TWOFA"
}
"jwt_token": "...token...",
"token_valid_until": "YYYY/MM/DD HH:mm:ss"
}

Token Error