Authentication
4 min
The CRM & Loyalty API uses a Bearer token. It is the same token as the Delivery API: you generate it once and use it for both.
Get a token
POST https://sandbox.expressoft.eu/connect/api/authentication/interop/token
Request body
{
"applicationId": "CloudInteropApplication",
"applicationVersion": "1.0.0.0",
"languageCode": "en",
"userName": "<your API user name>",
"password": "<your API password>"
}cURL
curl --location 'https://sandbox.expressoft.eu/connect/api/authentication/interop/token' \
--header 'Content-Type: application/json' \
--data '{"applicationId": "CloudInteropApplication", "applicationVersion": "1.0.0.0", "languageCode": "en", "userName": "<your API user name>", "password": "<your API password>"}'The response contains token and tokenExpireOn. For the fields of the request and of the response, see Authentication Overview in Getting Started.
Use the token
Authorization: Bearer <token>Renew the token
When a request returns 401, get a new token, replace the stored one and retry. Renew the token before tokenExpireOn to avoid 401 errors.
⚠️ WARNING
Keep the user name, password and token private. Never store them in client-side code or in a public repository.