Authentication

Pivot uses OAuth to allow your application to gain programmatic access, request, and obtain permission from an account.

You need to send a request to get an access token to Pivot Server, then you will receive the access token that will expire in 900 seconds (15 minutes). Whenever it expires, you should send another request to get a new access token.

Tips!

You could create a cron job that generates an access token request that runs every 14 minutes, stores the access token in your system, and uses the access token for every next request.

Access Token

Method and URL

POST [BASE_URL]/v1/access-token

Request Header

Key
Value

X-MERCHANT-ID

[Your Client ID]

X-MERCHANT-SECRET

[Your Client Secret]

Request Body

{
    "grantType": "client_credentials"
}

Response Body

{
    "code": "00",
    "message": "Success",
    "data": {
        "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJiYWNrZW5kLXBvcnRhbCIsInN1YiI6IjkyMmUzOWFiLTc1NjUtNDlmNi1iODRmLWZiNTYxMjI4MjFhZSIsImV4cCI6MTcxNDAyODE0MywiY2xpZW50SWQiOiI5MjJlMzlhYi03NTY1LTQ5ZjYtYjg0Zi1mYjU2MTIyODIxYWUiLCJtZXJjaGFudElkIjoiOTIyZTM5YWItNzU2NS00OWY2LWI4NGYtZmI1NjEyMjgyMWFlIn0.EkxckAJEcB4fgVU97mQC5eooBwQ7vhexzksafyUgOPU",
        "expiresIn": "900",
        "tokenType": "Bearer"
    }
}

Last updated