API Authentication

Read about how you can use tokens for API authentication.

To access the API, you need to use an access token to validate your requests. You can retrieve this token from the dashboard.

🚧

Warning

The token needs to be kept secret. Do not reveal it to anyone and avoid practices that might do so. For instance, it is advised not to save it in plain text and not to commit it to the source code repositories (like GitHub or Mercurial).

Authenticating requests

Every request made to the Seller Transaction API needs to include a header that includes a secret token that will prove the identity of the source of the request.

That secret token should be put in the x-marketplace-seller-token HTTP header:

An authenticated POST request looks like this:

POST https://.../api/v3/seller/tax/calculate HTTP/1.1
x-marketplace-seller-token: seller_token_********
Content-Type: application/json
Accept: */*
Content-Length: 1048

{ ... }

You can also use the curl command-line utility to perform the authentication. The following is an example of this:

$ curl --request POST \
  --url https://.../api/v3/seller/tax/calculate \
  --header 'Content-Type: application/json' \
  --header 'x-marketplace-seller-token: seller_token_********' \
  --data '{ ... }'

API token

The token is available in the Dashboard as explained in the API Access Tokens UI topic.