Authentication
Requirements
A basic understanding of OAuth is required. You can read more at oauth.net
Before you start you will need a Client ID and Secret.
You will need to create an application first.
OAuth Authentication
Authentication to the api is handled using OAuth 2.0 via the Client Credentials grant type.
The URLs for the auth server are as follows:
- Base URL: https://auth.tradesafe.co.za
- Access Token URL: https://auth.tradesafe.co.za/oauth/token
Generating a Token
An OAuth token is generated using the client credentials grant flow.
An HTTP POST request needs to be sent to https://auth.tradesafe.co.za/oauth/token
The following fields need to be included in the request:
- grant_type:
client_credentials
- client_id:
YOUR_CLIENT_ID
- client_secret:
YOUR_CLIENT_SECRET
Upon successful response you will receive a JSON response with an access_token
. You can then use the token for authorization with the API.
cURL Example
Response
Successful authentications return a JSON an access_token
.