EasyRoutes API
API ReferenceAuthentication

Authenticate

POST
/authenticate

Authenticate a client to obtain an access token using a client ID and secret key. The access token is required to make authenticated requests to the API. The token will expire after the duration specified in the response.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to authenticate a client and obtain an access token.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/authenticate" \  -H "Content-Type: application/json" \  -d '{    "clientId": "m2m-client-test-example-shop",    "clientSecret": "example_client_secret"  }'
{  "accessToken": "eyJh...",  "expiresInSeconds": "3600",  "organization": "example-shop.myshopify.com"}

{  "code": 3,  "message": "missing client_id"}

{  "code": 7,  "message": "failed to authenticate client"}

{  "code": 5,  "message": "shop not found"}
{  "code": 13,  "message": "error looking up shop feature flags"}
{  "code": 0,  "message": "string",  "details": [    {      "@type": "string"    }  ]}