Elastic Path Generate an Access Token API

The Generate an Access Token API from Elastic Path — 1 operation(s) for generate an access token.

Operations 1

POST /oauth/access_token Create an Access Token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elastic-path-generate-an-access-token-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elastic-path-generate-an-access-token-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Authentication Generate an Access Token API
  description: '

    All API endpoints require authentication. To authenticate your request, you will need to provide an access token. Access tokens are generated via an [authentication API endpoint](/docs/api/authentication/create-an-access-token).


    After creating an access token, you can authenticate your request by sending the access token in the `Authorization` header of your request:


    ```json

    Authorization: Bearer 212LJ3k0i2382364HIUEjfeJB98yvH

    ```


    :::note

    Read our [Quick Start guide](/guides/Getting-Started/your-first-api-request) on how to make your first API request.

    :::


    Access tokens expire after 1 hour. You will have to generate a new one. If you’re using our [JavaScript SDK](https://github.com/elasticpath/js-sdk), this is automatically handled for you.


    ## Client Credentials vs. Implicit Use Case Scenarios


    There are two authentication methods, `client_credentials` and `implicit`. The `implicit` authentication will generate an access token that has more limited access, restricting access to mostly read-only, whereas the access token from `client_credentials` has full read and write access. Typically, you would use the `implicit` authentication method for client-side browser based applications (i.e. frontend), and `client_credentials` for all administrative tasks (`CRUD`) you need to perform at the backend.


    ## Shopper Authentication


    An implicit access token is often used alongside an Account Management authentication token or a Customer token to access resources restricted to a shopper.


    ### Account Authentication


    Account Management authentication tokens are available for anyone using the [Account Management APIs](/docs/api/accounts/account-management-introduction).


    For each element in the list returned by the account member authentication API, a `token` value is returned. In order for a shopper to authenticate as the account, this value should be set as the `EP-Account-Management-Authentication-Token` header when calling Commerce. This header grants access to additional resources associated with the account, such as [carts](/docs/api/carts/account-cart-associations), [orders](/docs/api/carts/get-customer-orders), [catalogs with associated rules](/docs/api/pxm/catalog/rules), and [addresses](/docs/api/addresses/addresses-introduction).


    The set of permissions available to a shopper using an Account Management Authentication token is documented in [Permissions](/docs/authentication/tokens/permissions#implicit-account-management-authentication-token).


    For more information on implementing account management authentication tokens, see [Account Management Authentication Tokens](/docs/api/accounts/post-v-2-account-members-tokens).


    ### Customer Authentication


    Customer tokens are available for anyone using the [Customer APIs](/docs/customer-management/customers).


    A customer token provides access to the records of the customer. Use single sign-on or the email address and password of the customer to retrieve the [customer tokens](/docs/customer-management/customer-management-api/customer-tokens). The customer token should be set as the `X-Moltin-Customer-Token` header to access the following APIs:


    - [Get a Customer](/docs/customer-management/customer-management-api/get-a-customer)

    - [Update a Customer](/docs/customer-management/customer-management-api/update-a-customer)

    - [Get Customer Addresses](/docs/api/customer-addresses/get-v-2-customer-addresses)

    - [Get an Address](/docs/api/customer-addresses/get-v-2-customer-addresses)

    - [Create an Address](/docs/api/addresses/get-v-2-account-address)

    - [Update an Address](/docs/api/addresses/put-v-2-account-address)

    - [Get all Orders](/docs/api/carts/get-customer-orders)

    - [Get an Order](/docs/api/carts/get-an-order)

    - [Get Customer Carts](/docs/api/carts/create-a-cart)

    - [Create an Association between a Customer and a Cart](/docs/api/carts/create-customer-cart-association)

    - [Delete an Association Between a Customer and a Cart](/docs/api/carts/delete-customer-cart-association)

    - [Add Promotion to Cart](/docs/api/carts/manage-carts#add-promotion-to-cart)


    For more information on implementing customer tokens, see [Customer Tokens](/docs/customer-management/customer-management-api/customer-tokens).


    ## Organization


    To help with managing stores within an organization, the access token generated for the organization can be used to authenticate requests for any store within the organization.

    To make a request to a store within the organization:

    1. Set the `EP-Org-ID` header with the organization ID

    2. Set the `EP-Store-ID` header with the store ID


    For example, to get all the application keys for a store with ID `9adcc2d3-6a39-4057-bbc1-b036f1d6c735` that is part of the organization with ID `afb3dd03-1c89-4ff8-8611-cf759b15827f`:

    ```bash

    curl -X GET ''https://useast.api.elasticpath.com/v2/application-keys'' \

    -H ''Authorization: Bearer d5525335fedf1b20f081f641d8d32980ec553b5c'' \

    -H ''EP-Org-ID: afb3dd03-1c89-4ff8-8611-cf759b15827f'' \

    -H ''EP-Store-ID: 9adcc2d3-6a39-4057-bbc1-b036f1d6c735''

    ```


    ## Authenticating for Use on the Documentation site


    In order to perform any of the API requests directly on the documentation site, you will need to authenticate to get an access token. After the first request, any subsequent request will continue to use the same access token.

    '
  contact:
    name: Elastic Path
    url: https://www.elasticpath.com
    email: support@elasticpath.com
  version: 26.0218.7213153
  x-version-timestamp: 2026-02-18 18:20:34+00:00
  license:
    name: MIT
    url: https://raw.githubusercontent.com/elasticpath/elasticpath-dev/main/LICENSE
servers:
- url: https://useast.api.elasticpath.com
  description: US East
- url: https://euwest.api.elasticpath.com
  description: EU West
security: []
tags:
- name: Generate an Access Token
paths:
  /oauth/access_token:
    post:
      tags:
      - Generate an Access Token
      summary: Create an Access Token
      operationId: CreateAnAccessToken
      description: '

        ### Client Credentials


        A `client_credentials` token is used when the credentials are not publicly exposed, usually a server-side language such as PHP or Node.js. This type of authentication enables `CRUD` access to all resources.


        `client_id` and `client_secret` are created and managed via [Application Keys](/docs/api/application-keys/create-an-application-key).


        To see the access granted by a `client_credentials` token, refer to [Permissions](/docs/authentication/tokens/permissions).



        ### Implicit


        An `implicit` token is typically used for situations where you are requesting data on the client side and you are exposing your public key. When authenticated implicitly, you can only fetch (`GET`) data with live status (products, categories, brands, etc).


        The `implicit` token is most appropriate for use inside client-side applications, such as JavaScript.


        :::caution

        An `implicit` token can be thought of as a **Read only** token.

        :::

        '
      requestBody:
        $ref: '#/components/requestBodies/CreateAccessToken'
      responses:
        '200':
          $ref: '#/components/responses/AccessToken'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    BadRequestError:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          examples:
            bad-request-error:
              summary: Bad Request
              value: "{\n  \"errors\": [\n    {\n      \"title\": \"Bad Request\",\n      \"status\": \"400\",\n      \"detail\": \"The field 'name' is required\"\n    }\n  ]\n}\n"
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          examples:
            unauthorized-error:
              summary: Unauthorized
              value: "{\n  \"errors\": [\n    {\n      \"title\": \"Unauthorized\",\n      \"status\": \"401\",\n      \"detail\": \"Unauthorized\"\n    }\n  ]\n}\n"
    AccessToken:
      description: Access Token
      content:
        application/json:
          schema:
            type: object
            properties:
              access_token:
                type: string
                description: The access token you use to authenticate requests to the API.
              token_type:
                type: string
                description: Right now this is only `Bearer`.
              identifier:
                type: string
                description: The type of token requested. This can be a `client_credentials` or `implicit`.
              expires_in:
                type: integer
                description: The duration in seconds after which the token expires.
              expires:
                type: integer
                description: The epoch time that this token expires at.
          examples:
            Client Credentials:
              summary: Access token from Client Credentials
              value:
                access_token: xa3521ca621113e44eeed9232fa3e54571cb08bc
                token_type: Bearer
                expires_in: 3600
                expires: 1524486008
                identifier: client_credentials
            Implicit:
              summary: Access token from Implicit
              value:
                access_token: xa3521ca621113e44eeed9232fa3e54571cb08bc
                token_type: Bearer
                expires_in: 3600
                expires: 1524486008
                identifier: implicit
    InternalServerError:
      description: Internal server error. There was a system failure in the platform.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          examples:
            internal-server-error:
              summary: Internal server error
              value: "{\n  \"errors\": [\n    {\n      \"title\": \"Internal Server Error\",\n      \"status\": \"500\",\n      \"detail\": \"there was a problem processing your request\"\n    }\n  ]\n}\n"
  requestBodies:
    CreateAccessToken:
      content:
        application/x-www-form-urlencoded:
          schema:
            type: object
            required:
            - grant_type
            - client_id
            properties:
              grant_type:
                type: string
                description: The grant type.
                enum:
                - client_credentials
                - implicit
              client_id:
                type: string
                description: Your `client_id`
              client_secret:
                type: string
                description: Your `client_secret`. Only required for client credentials.
          examples:
            Create Example:
              summary: Create an Access Token using Client Credentials
              value:
                grant_type: client_credentials
                client_id: jJBrLb0q1Q7bZ5GiGttD5T1471b0IeXAVgNyOlw19q
                client_secret: mzr6gnvdQODSgT3mSxxWIv3y8pAp8cUzDELXa3g4fB
  schemas:
    Errors:
      required:
      - errors
      properties:
        errors:
          type: array
          items:
            type: object
            required:
            - status
            - title
            properties:
              status:
                type: string
                description: The HTTP response code of the error.
                format: string
                examples:
                - '400'
              title:
                type: string
                description: A brief summary of the error.
                examples:
                - Bad Request
              detail:
                type: string
                description: Optional additional detail about the error.
                examples:
                - The field 'name' is required