Skip to main content

Get Access Token

POST https://api-sandbox.letpay.io/auth

Requests a new refreshed access token to be used on every authenticated endpoint. Each token is configured to expire after 5 minutes.

Authorization

HeaderValue
X-Auth-TokenMY_ACCESS_TOKEN

Request Body

  • Type: form-data
  • apiKey: A key that can be used to authenticate
  • apiSecret: A secret that can be used to authenticate

Response Body

Example Request

200 - Authenticated
  curl --location 'https://api-sandbox.letpay.io/auth' \
--form 'apiKey="MY_API_KEY"' \
--form 'apiSecret="MY_API_SECRET"'

Example Response

Header
  Content-Type: application/json
Body
{
"token": "MY_ACCESS_TOKEN",
"user": {
"id": "acb14525-577b-46b5-b40f-861d78341ce2",
"username": "MY_USERNAME",
"name": "MY_NAME",
"enable": true,
"open": true,
"roles": ["MERCHANT_ADMIN"],
"merchant_id": "acb14525-577b-46b5-b40f-861d78341ce2"
},
"version": "0.5.21"
}