Authorization Flow

All calls made to the Sniptech Partner API’s require a Bearer Authorization Token. Details for further accessing the Authorization framework can be found here: Authorization.

Picture

Authorization Calls

Request an access_token for scope cashback using your client_id and client_secret provided by Sniptech.

Sample Authorization token POST call:

curl --location --request POST '{{base_url}}/auth/token' ^ 
--header 'Content-Type: application/x-www-form-urlencoded' ^
--data-urlencode 'grant_type=client_credentials' ^
--data-urlencode 'client_id=<CLIENT_ID>' ^
--data-urlencode 'client_secret=<CLIENT_SECRET>' ^
--data-urlencode 'scope=cashback'

Sample Authorization Token POST Response:

{ 
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiYWNjZXNzIiwiSXNzdWVyIjoiSXNzdWVyIiwiVXNlcm5hbWUiOiJKYXZhSW5Vc2UiLCJleHAiOjE2NDkzMTYxMDQsImlhdCI6MTY0OTMxNjEwNH0.6n_ZxEEUBEio623kvZoq6WT7qEwkOrny-l9SzUX_Bto",
"refresh_token": "eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiUmVmcmVzaCIsIklzc3VlciI6Iklzc3VlciIsIlVzZXJuYW1lIjoiSmF2YUluVXNlIiwiZXhwIjoxNjQ5MzE2MTA0LCJpYXQiOjE2NDkzMTYxMDR9.kV8Icb3dcvKebp85Zss4BzpDKmFgSvWan8_d3JX9owE",
"expires_in": 299,
"scope": "cashback"
}