Authentication
Token-based Authentication
UPDATE NOTICE
We have launched a new Token-based Authentication mechanism, which is active on Production.
Generate Access Token for Authentication
This endpoint is used to generate an access token required for authenticating.
Endpoint
GET
https://connect-sandbox.su-api.com/SUAPI/jservice/auth/generate-access-tokenHeader
client-id: base64_encode(domain)
client-secret: (you can generate from extranet) client-id
string
Yes
Base64-encoded domain name
client-secret
string
Yes
Client secret key
Success Response - For Production
{
"success": true,
"data": {
"token_type": "Bearer",
"token": "live_eyJpdiI6IlI1NGR6dndiRTNpci9lcGRZSm8wMXc9PSIsInZhbHVlIjoidEI1NW1SVVNQclFqa0VLRE43aUVXT21YL24yTzViSHRMTHJTYnQ3S2xhYzJ6TFZlMFI0R21oNHZEcHk4M0JuYytvQ3I3NnowL1FsaTNvNkxmbno0UFRSaTVEcjRmMmNNSysvZ29aNzQvNi82QjV4TVhWRTdsbHRybGtWeEJ5MXZYSkJVbjJIL2xHVkRrOGdKcjZnN1lRPT0iLCJtYWMiOiJjNjE5NjI5NTZjNjAwYmQ0NTM1MjBiMjhkNTcxOWFmNzUzMjQzMDBkMDU1ZTE1OGVmY2YyMmM5NmRiNzFkM2YxIiwidGFnIjoiIn0=",
"expire_in": "3600"
},
"message": "Access Token generated successfully"
}Success Response - For Sandbox
{
"success": true,
"data": {
"token_type": "Bearer",
"token": "sandbox_eyJpdiI6InVTL013bmlpc3VMZVVISmxqNldMMVE9PSIsInZhbHVlIjoiS05nVTVWQ1oxNVVQdk1hWHViZjlUbVRIc0owbjJWdnV1UW1tNlFRN0xjRTlVL0ZRQ093Rjd0SmtZay9kUTJ0dlRlOWl2K2VpZ2Q4MUVuUDhBb3hNQW1XeE81YzA4MXpmZmNDVHk4N0hSV0NCNGRrbXkrLytrS3A1cUtTSHdWWmYyYTY5SXVDNnFoTVdYSVIvalNneTdnPT0iLCJtYWMiOiJhOGUyOWUyNjMwYzE5MjI5MGMwNTI0OTk2Y2Q4ZmQzM2M1NjJmMDAzMjI3NzJjMjYyNmY1ZDQxOTJmNDU2ZWE2IiwidGFnIjoiIn0=",
"expire_in": "3600"
},
"message": "Access Token generated successfully"
}Response Body Parameters
success boolean
Indicates whether the token generation was successful (true or false).
data object
Contains the access token details.
token_type string
Type of token. Always Bearer.
token string
The actual access token to be used in the Authorization header.
expire_in string
Token expiry duration in seconds.
message string
Message indicating the result of the token generation request.
Validate Access Token for Authentication
This endpoint is used to generate an access token required for authenticating.
Endpoint
GET
https://connect-sandbox.su-api.com/SUAPI/jservice/pmspropertyHeader
When making authenticated API calls, an Access Token must be provided using the Authorization header in the format below:
Authorization: Bearer <access_token>The <access_token> varies depending on whether you're working with the Production or Sandbox environment.
1. Production Environment Token
Authorization: Bearer live_<token_string> // requiredTokens prefixed with
live_are specific to the production environment.These tokens are valid only for production API endpoints.
Example:
Authorization: Bearer live_eyJpdiI6IlI1NGR6dndiRTNpci9lcGRZSm8wMXc9PSIsInZhbHVlIjoidEI1NW1SVVNQclFqa0VLRE43aUVXT21YL24yTzViSHRMTHJTYnQ3S2xhYzJ6TFZlMFI0R21oNHZEcHk4M0JuYytvQ3I3NnowL1FsaTNvNkxmbno0UFRSaTVEcjRmMmNNSysvZ29aNzQvNi82QjV4TVhWRTdsbHRybGtWeEJ5MXZYSkJVbjJIL2xHVkRrOGdKcjZnN1lRPT0iLCJtYWMiOiJjNjE5NjI5NTZjNjAwYmQ0NTM1MjBiMjhkNTcxOWFmNzUzMjQzMDBkMDU1ZTE1OGVmY2YyMmM5NmRiNzFkM2YxIiwidGFnIjoiIn0=2. Sandbox Environment Token
Authorization: Bearer sandbox_<token_string>Tokens prefixed with
sandbox_are specific to the sandbox/test environment.These cannot be used with production endpoints.
Example:
Authorization: Bearer sandbox_eyJpdiI6InVTL013bmlpc3VMZVVISmxqNldMMVE9PSIsInZhbHVlIjoiS05nVTVWQ1oxNVVQdk1hWHViZjlUbVRIc0owbjJWdnV1UW1tNlFRN0xjRTlVL0ZRQ093Rjd0SmtZay9kUTJ0dlRlOWl2K2VpZ2Q4MUVuUDhBb3hNQW1XeE81YzA4MXpmZmNDVHk4N0hSV0NCNGRrbXkrLytrS3A1cUtTSHdWWmYyYTY5SXVDNnFoTVdYSVIvalNneTdnPT0iLCJtYWMiOiJhOGUyOWUyNjMwYzE5MjI5MGMwNTI0OTk2Y2Q4ZmQzM2M1NjJmMDAzMjI3NzJjMjYyNmY1ZDQxOTJmNDU2ZWE2IiwidGFnIjoiIn0=
Last updated
Was this helpful?