Generate Token [v3]
This API helps you generate a token
by submitting your access_key and access_secret. The token will give you access all other APIs of Nimbbl and will need to be passed as Authorization in the header of subsequent API calls. The token has an expiry of 20 minutes after which you will need to generate a fresh token. You can create multiple tokens, each of these tokens will have their own expiry.
Request Body required
access_key issued to you by Nimbbl, you can get this from the dashboard
access_secret issued to you by Nimbbl, you can get this from the dashboard
- 200
- 4XX
When the token is successfully generated, the response will be as below
Schema
This is the token, you will need to add it to the Header for subsequent API calls
This is the expiry of the token, it is expressed in UTC. If the token has expired, you will need to hit the API again to generate another token. The token has an expiry time of 20 minutes
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJleHAiOjE2MTc4ODkxMjJ9.mBz-d9hizuhLaIBVHYR8eGL5E9mJ0F2gsRfS5VNqrAw",
"expires_at": "2021-01-09T09:49:57.715413"
}
When the token cannot be generated, the response will be as below
Schema
error object
This is the error_code generated by Nimbbl
This is a customer friendly message that can be displayed to your consumer
This explains to your team how to recover from the error
{
"error": {
"nimbbl_error_code": "INVALID_REQUEST_PARAMETER",
"nimbbl_consumer_message": "Sorry, your payment cannot be processed due to a technical error. Please try again after some time.",
"nimbbl_merchant_message": "There is an input validation error, please check the payload of your request."
}
}