For the complete documentation index, see llms.txt. This page is also available as Markdown.

Authentication

Learn how ESW STS authentication works, how to request OAuth 2.0 access tokens with client credentials, and how to send Bearer tokens on API requests.

ESW APIs use the Security Token Service (STS). STS issues and validates OAuth 2.0 access tokens. You pass these tokens as Bearer tokens on every API request.

Most integrations use the OAuth 2.0 client credentials flow. You authenticate with a client_id and client_secret. You exchange them for a short-lived access token from STS.

How authentication works

1

Request an access token from STS

STS token endpoint

POST https://security-sts.<environment>.eshopworld.com/connect/token

Exchange your client_id + client_secret for OAuth 2.0 access token.

Headers

Name
Value

Content-Type

application/x-www-form-urlencoded

Body (form URL encoded)

Name
Type
Description

grant_type

string

Use client_credentials

scope

string

Space-separated scopes Example: checkout.preorder.api.all pricing.advisor.api.all

client_id

string

Client identifier provided by ESW

client_secret

string

Client secret provided by ESW

Response

{
  "access_token": "<jwt>",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "checkout.preorder.api.all"
}

Use the examples on Access Tokens.

2

Call ESW APIs with the Bearer token

Send the token in the Authorization header:

Authorization: Bearer <access_token>

If the token is missing or invalid, you will get 401 or 403.

Client credentials

ESW provides your credentials via a secure channel during setup. You use them only when requesting tokens from STS.

  • Client ID: A unique identifier assigned to a client.

  • Client secret: A unique secret assigned to a client. Your client secret is private and you must keep your client secret confidential.

Client credentials are valid for six months. There is a one-month rollover window for rotating secrets.

key

Token lifetime and renewal

STS returns expires_in in the token response. Cache tokens and reuse them until they expire. Request a new token when you get 401 and the token is expired.

OAuth / OpenID Connect notes

STS is compatible with OAuth 2.0 and OpenID Connect. See the external reference: OAuth 2.0.

Last updated

Was this helpful?