Authentication
All Su API requests need to be authenticated through the authorization header. The Su APIs offer only basic authentication methods.
Authorization
Authorization involves sending credentials (username
and password
) and app-id
with every API request. Here's how it works:
Encoding Credentials
Your username and password are encoded in Base64 format and separated by a colon (
:
).For example,
username:password
becomesdXNlcm5hbWU6cGFzc3dvcmQ=
in Base64.
Adding to Header
The encoded credentials are added to the request header after the word "Basic". Example:
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Usage Example
When making an API request to generate API keys, you include the
Authorization
header and your unique app ID provided by Su.
Example header
Su Partner Supply API Authentication
The Su Partner Supply API authentication process validates the identity of the client attempting to make a connection by using an authentication protocol. The system needs to make sure each end user is properly validated.
Your API keys carry many privileges, so be sure to keep them secure. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Partners can opt for their own domain for live production. STAAH requires an SSL certificate for the domain that is valid for the next 2 years at least.
Encoding
Encoding provides a specific mechanism for handling text in various available character encodings. The Partner Supply API uses UTF-8 encoding for the JSON body for all API requests and responses.
Authentication Failure
An API failure is any response that does not confirm to the system’s expected behavior when invoked by the client. If a call fails authentication, the API returns HTTP status code 401. See below:
Authentication Failure Error
Last updated
Was this helpful?