Loyalty SSO - OAuth token exchange

Purpose

During the merchant registration process, you should have provided the following essential OAuth details:

  • Base OAuth URL
  • Client ID
  • Client Secret

At this stage of the OAuth workflow, Deliverect anticipates receiving an authorisation code via an HTTP redirect initiated by your third-party application SSO redirect. Upon successful reception of this code, Deliverect will then call your loyalty provider's authentication endpoint, located at {baseOauthUrl}/token, to exchange the authorisation code for an access token.

Following the OAuth workflow, then Deliverect will proceed to obtain the customer details by providing the received access token in the headers when calling the Get customer endpoint.

Payload

AttributesTypeRequiredDescription
grant_typestringYesRefers to the method or flow that the Deliverect application uses to obtain an access token from an authorization server. Currently, Deliverect only supports Client Credentials Grant. This field is always sent as authorization_code.
client_idstringYesThe client ID configured by the merchant during the registration process
client_secretstringYesThe client secret configured by the merchant during the registration process
codestringYesThe authorisation code received during the SSO redirect

Response

AttributesTypeRequiredDescription
token_typestringYesThe token type issued by the authorisation server. Deliverect currently supports only Bearertoken types.
scopestringYesNot required by the Loyalty API server. This field can be set to an empty string.
created_atstringYesUnix timestamp on when the token was created.
access_tokenstringYesThe credential that represents the authorisation granted by the loyalty provider.

Body Params
string
required
Defaults to authorization_code
string
required
string
required
string
required
string

The deliverect customer account id

string

The loyalty profile id being use

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json