Authentication using Auth Token
Description
Before making a call to submit an SMS, it is necessary to generate an auth token using the 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
Parameter | Required | Value |
---|---|---|
Authorization | Y | Type: Basic Username: API Key Password: Secret |
Accept | Y | application/json |
Response
If Successful, the API call will respond with an HTTP 200 OK with a JSON payload
Parameter | Description |
---|---|
account_id | API Key that was sent in request |
product | SMS |
jwt_token | This 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_until | The "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": "...Submit SMS API Key...",
"product": "SMS"
}
"jwt_token": "...token...",
"token_valid_until": "YYYY/MM/DD HH:mm:ss"
}