Esenda

Authentication

Authenticate with the esenda API using OAuth2 client credentials

Make a request to the authorisation endpoint using the client_id and client_secret for your partner account. Each partner account has one client ID and secret. A token from this request works for every organisation that has authorised the partner; the organisation is identified by the shortcode in the endpoint path, not by the credentials.

An organisation must complete onboarding and authorise the partner before the partner can act for it. The organisation can revoke that access at any time. An organisation can authorise more than one partner; each partner sees only its own orders, refunds and payouts.

Production

curl --request POST \
  --url https://api.esenda.com/oauth/token \
  --header 'content-type: application/json' \
  --data '{"client_id":"ABC","client_secret":"XYZ","audience":"organisation","grant_type":"client_credentials"}'

Sandbox

curl --request POST \
  --url https://api-demo.esenda.com/oauth/token \
  --header 'content-type: application/json' \
  --data '{"client_id":"ABC","client_secret":"XYZ","audience":"organisation","grant_type":"client_credentials"}'

See API Conventions for the production and sandbox base URLs.

For API error responses, see Errors.

On this page