younifyd
Menu

Post V2 Account Members Tokens

Generate an Account Management Authentication Token

POST/v2/account-members/tokens

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Post V2 Account Members Tokens action (under Accounts).
  3. Fill in the fields below, then reference the result from later steps as {{postV2AccountMembersTokens.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

dataobjectrequired
json
{
  "data": {}
}

Response

Returns 201 with an object. Read it in later steps with {{postV2AccountMembersTokens.response.data.<field>}}.

dataarray<object>
typestring

Specifies the type of the object.

account_namestring

The name of the account that this token grants access to.

account_idstring (uuid)

The ID of the account that this token grants access to.

tokenstring

The JWT authentication token that the shopper uses as the `EP-Account-Management-Authentication-Token` header [in all other endpoints](https://elasticpath.dev/docs/commerce-cloud/authentication/tokens/account-management-authentication-token).

expiresstring (date-time)

The epoch time that this token expires at. The time is set to 24 hours after the token is generated.

metaany
linksobject
currentstring (uri)

Always the current page.

firststring (uri)

Always the first page.

laststring (uri)

Always `null` if there is only one page.

nextstring

Always `null` if there is only one page.

prevstring

Always `null` if the user is on the first page.

json
{
  "data": [
    {
      "type": "string",
      "account_name": "acc-name-1",
      "account_id": "908f7849-60da-4e4a-a3b1-51d4cbe3b953",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOiIyMDIxLTAzLTE2VDE5OjM2OjExLjA3MFoiLCJpYXQiOiIyMDIxLTAzLTE1VDE5OjM2OjExLjA3MFoiLCJzY29wZSI6IjFjNDVlNGVjLTI2ZTAtNDA0My04NmU0LWMxNWI5Y2Y5ODVhMyIsInN1YiI6IjFjNDVlNGVjLTI2ZTAtNDA0My04NmU0LWMxNWI5Y2Y5ODVhMiJ9.ytQ3UutTl_RJ8NiB1xN29Ta23p-FXsYOhcUM7MUQ4CM",
      "expires": "2021-03-16T19:36:11.070Z"
    }
  ],
  "meta": null,
  "links": {
    "current": "https://useast.api.elasticpath.com/v2/account-members/tokens?page[offset]=0&page[limit]=25",
    "first": "https://useast.api.elasticpath.com/v2/account-members/tokens?page[offset]=0&page[limit]=25",
    "last": "https://useast.api.elasticpath.com/v2/account-members/tokens?page[offset]=0&page[limit]=25",
    "next": null,
    "prev": null
  }
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.