Skip to main content

Your credentials

Your store’s credential is already in the DropHub dashboard, under API integration. Copy the client_id, then click Show a new client secret and copy the client_secret. The credential gives full access to the External API for your store.
The secret is shown once. Store it safely. If it is lost, click Show a new client secret again; the previous secret keeps working for 24 hours.

Get a token

Form-body credentials also work:
The body must be application/x-www-form-urlencoded. The response:
Send it on every /api/v2/external request as Authorization: Bearer <access_token>. Each credential belongs to one store. A partner serving several stores uses one credential per store. A shipment that belongs to another store answers 404.

Token lifecycle

Read expires_in rather than assuming a duration. Cache the token and refresh a little before it expires. If a request fails with 401, get a new token and retry once. Repeated 401s after a fresh token mean the credential was revoked.

Token endpoint errors