storefrontAccessTokenCreate mutation

Creates a storefront access token.


On this page


Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.

mutation storefrontAccessTokenCreate($input: StorefrontAccessTokenInput!) { storefrontAccessTokenCreate(input: $input) {
  1. <font style="color:#1F61A0;">shop</font> <font style="color:#555555;">{</font>
  2. <font style="color:#1F61A0;">id</font>
  3. <font style="color:#555555;">}</font>
  4. <font style="color:#1F61A0;">storefrontAccessToken</font> <font style="color:#555555;">{</font>
  5. <font style="color:#1F61A0;">id</font>
  6. <font style="color:#555555;">}</font>
  7. <font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font>
  8. <font style="color:#1F61A0;">field</font>
  9. <font style="color:#1F61A0;">message</font>
  10. <font style="color:#555555;">}</font>
} } { “input”: {
  1. <font style="color:#8B2BB9;">"title"</font><font style="color:#555555;">:</font> <font style="color:#D64292;">"placeholder"</font>
} }


Arguments

Argument Description
input
(
[StorefrontAccessTokenInput!](https://shopify.dev/docs/admin-api/graphql/reference/access/storefrontaccesstokeninput)

) REQUIRED
Provides the input fields for creating a storefront access token.


StorefrontAccessTokenInput fields

  • title ([String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)) REQUIRED
    A title for the storefront access token.


Return fields

  • shop ([Shop!](https://shopify.dev/docs/admin-api/graphql/reference/store-properties/shop))
    The user’s shop.
  • storefrontAccessToken ([StorefrontAccessToken](https://shopify.dev/docs/admin-api/graphql/reference/access/storefrontaccesstoken))
    The storefront access token.
  • userErrors ([[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror))
    List of errors that occurred executing the mutation.