Generate authentication token

This service provides an access JWT token for the user to use the On Ramp Widget. Endpoint: http://b2b-widget-onramp-api.ripio.com/api/v1/auth
Sandbox:: https://b2b-widget-onramp-api.sandbox.ripio.com/api/v1/auth
Method: POST Parameters:
ParameterTypeDescription
usernamestringThe username is composed of a concatenation of client_id + “:” + external_ref.
passwordstringThe password is the client_secret
Disclaimer:
  • external_ref: UUID v4 that represents the user logged into your system. It must be a unique and unrepeatable identifier of a user of your system (Read more about UUID and try using generator). This value is then used in the request for approval of a purchase transaction or when reporting the result of a transaction. (see Webhooks). In the documentation we refer to this value as external_ref.
Request:
curl \
--location --request POST 'http://b2b-widget-onramp-api.ripio.com/api/v1/auth' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=<client_id>:<external_ref>' \
--data-urlencode 'password=<client_secret>'
Example:
curl \
--location --request POST 'http://b2b-widget-onramp-api.ripio.com/api/v1/auth' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=<client_id>:USER_1111' \
--data-urlencode 'password=<client_secret>'
Response:
{
    "succeed": true,
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uIjoiMThhYjZkNmM4ZDk4NWE5Y2M4N2IwMTcyN2ExMWYwOTQ4YzJmNGUxYzQ0ODEzZTZhNDU0MzcxYTg1NzY3YjE5OSIsImV4cCI6MTcwODI5ODMzM30.4aRUEXLkUs3jf-DYMcH8claUuDKfc8qbTjW6JzpBTjI",
    "token_type": "bearer"
}