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.

Service
Sandbox
Production

STS (OAuth)

https://security-sts.sandbox.eshopworld.com/connect/token

https://security-sts.production.eshopworld.com/connect/token

Use STS URLs only to obtain OAuth access tokens.

Send API requests to the service-specific base URLs in API Base URLs. Do not send API requests to an STS host.

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"
}
{
  "error": "invalid_client",
  "error_description": "Client credentials are invalid."
}

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.

API Base URLs

Use these request base URLs for API calls. Add endpoint-specific paths from the relevant API reference.

API
Sandbox

Checkout

https://api.sandbox.esw.com

Order

https://api.sandbox.esw.com

Package Management

https://api.sandbox.esw.com

Package

https://logistics-package-api.sandbox.eshopworld.com

Customs Catalog

https://logistics-customscatalog-api.sandbox.eshopworld.com

Pricing Advisor

https://pricing-advisor-api.sandbox.eshopworld.com

GRP Returns

https://api.sandbox.esw.com

Fulfillment

https://api.sandbox.esw.com

Last updated

Was this helpful?