post https://api.sandbox.payments.stonex.com/api/v/authentication
The Authentication API allows developers to request an authorization token by providing a unique client_id
and client_secret
. This token is required to authenticate subsequent API requests. If you do not have your client_id
and client_secret
, please contact our account management team to obtain these credentials.
Request
To obtain an authorization token, make a POST request to the authentication endpoint with your client_id
and client_secret
in the request body.
{
"client_id": "0oaflsxggtKgKNyds2e7",
"client_secret": "xEMkDkI7DCFcV5MQDp-LEqN3K2ZVjy_Z2vWv_mi21xpajEWsxaPKvRVhDxbKSGw2"
}
Response
The response will include the authorization token needed to authenticate your API requests.
{
"token_type":"Bearer",
"expires_in":3600,
"access_token":"eyJraWQiOiJiLU5iV2o4Tm5zUWJUMFRkRXFTWXlqMHNNUVhNVzBRb0JOY0s3bkJBY1FjIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULjB6bUpEOWJHX0tPUlVkQmRMcUs5XzRMeFpRdmdPWmlFdU10aTRxSmVieVEiLCJpc3MiOiJodHRwczovL2F1dGgucHJldmlldy5zdG9uZXguY29tL29hdXRoMi9hdXNmbHQ0bmpyYzlWZE82aTFkNyIsImF1ZCI6ImFwaTovL3BheW1lbnRzY29ubmVjdCIsImlhdCI6MTcyNTAyMzk2NSwiZXhwIjoxNzI1MDI3NTY1LCJjaWQiOiIwb2FmbHN4Z2d0S2dLTnlZVzFkNyIsInNjcCI6WyJjbGllbnRfY3JlZGVudGlhbHMiXSwic3ViIjoiMG9hZmxzeGdndEtnS055WVcxZDcifQ.GlDmnqv_TexdLHEPcJVmjCi3_dxTXY1XAbiejZECUBK9FQyOG4DlIioB67wm-tZahhW7CzGUIrU5zNApqmIZJqTL7mhypHxmVyRHiSiITD2csy8MpPJ87C_DOEiJTSOaRb0zuNpYqE1KrHZfb6Of6sd3ja4Vs6xshrjDXQlNT9iRAyvKm0fNdsZ7nGpqStsTcE2rv-6VHOmC6V8z3PiWw0rJm5Aoa5Ji2GVCiwte4LfkoUiQMRW2OeySrfVqaChRHQKGRj2LZtgRF-CprMxVpv8muoIZoPVQ3lJ97o_daC4u4BKo5QCcmq0b6_ouGw",
"scope":"client_credentials"
}
Usage:
- Obtain Credentials: Contact your account manager to get your
client_id
andclient_secret
. - Request Token: Send a POST request to the token endpoint with your credentials.
- Authenticate Requests: Use the
access_token
provided in the response to authenticate your subsequent API requests.
Notes:
- Security: Keep your
client_id
andclient_secret
secure. Do not share them publicly. - Token Expiry: Tokens are valid for a limited period (indicated by
expires_in
in seconds). You may need to request a new token periodically.