Get Instant Site API token

POST https://app.ecwid.com/instantsite/oauth/token?grant_type={grant_type}&site_id={site_id}&code={code}

Required access scopes

Your app must have the following access scopes to make this request: manage_instant_site

Query params

All query params are required.

Name
Type
Description

grant_type

string

Type of the generated token that defines if it can apply any changes to Instant Site.

One of:

authorization_code - generated token grants full access to Instant Site API methods

draft_code - generated token only allows opening the Instant Site editor and can't be used for API requests

site_id

number

Ecwid store ID.

code

string

App's secret_token. The app must have the manage_instant_site access scope.

Response JSON

A JSON object with the following fields:

Header
Type
Description

accessToken

string

Token for Instant Site API calls. Requires authorization_code in the grant_type query param.

tokenType

string

Type of the received token. Always bearer.

expiresIn

number

Token's expiration time in milliseconds. For example, 86400.

Last updated

Was this helpful?