Skip to main content

Implicit token

An implicit token is typically used for situations where you are requesting data on the client side, such as in a storefront, and you are exposing the client id. Unlike with client_credentials, a client secret is not required to obtain the token.

With implicit authentication, access is limited to publicly available data, such as the shopper catalog. Limited write access is available for carts and checkout. An implicit token is often used alongside an Account management authentication token or a Customer token to access resources restricted to a shopper. For more details on access granted by an implicit token, refer to Permissions.

POST Create an implicit token

https://useast.api.elasticpath.com/oauth/access_token

Form data parameters

NameRequiredTypeDescription
client_idRequiredstringYour client_id
grant_typeRequiredstringThe grant type, in this case it must be implicit

Request Examples

Curl

curl -X POST "https://useast.api.elasticpath.com/oauth/access_token" \
-H "Content-Type: application/json" \
-d "client_id=XXXX" \
-d "grant_type=implicit"

JavaScript SDK

import { gateway as EPCC_Gateway } from "@moltin/sdk";

const EPCC = await EPCC_Gateway({
client_id: "DkkDs01npaexROx8fB8NpMCQIPMiYxgacjYY48J12i",
});

Response Example

200 OK

{
"expires": 1524486008,
"identifier": "implicit",
"expires_in": 3600,
"access_token": "xa3521ca621113e44eeed9232fa3e54571cb08bc",
"token_type": "Bearer"
}