Access token — location key

This API is used to get an access token for one location with your Developer API key.

It returns an access_token (JWT) valid for 75 minutes. Send it as Authorization: Bearer {access_token} in every Customer Developer API request. The token only reaches that location.

Note: Call it from your server; never expose the Api-Key in front-end code. The location must be linked to your API key. When the token expires (401), request a new one.

URL

{{interface_url}}/{{version}}/locations/{{location_id}}/access_token

Method

POST

Headers

Api-Key: {your Developer API key}

Request Parameters

None.

URL Parameters

ParameterRequired/OptionalTypeDescription
location_idRequiredIntegerLocation the token is issued for.

Example Request (cURL)

curl --location --request POST '{{interface_url}}/{{version}}/locations/{{location_id}}/access_token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Api-Key: {{interface_api_key}}' \
--data '{}'

Example Response (JSON) — 200

{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
  "user_id": 17205
}

Error Responses

Format: { "error": { "code", "name", "message", "details" } }

StatusErrorWhen
404developer_not_foundThe Api-Key does not exist.
401developer_is_not_activeThe API key is disabled.
401location_not_found / location_inactiveWrong or inactive location, or not linked to the key.

Path Params
string
required
string
required
Body Params
Headers
string
Response

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