A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://shopify.dev/docs/api/usage/authentication below:

Shopify API authentication

Shopify API authentication

This guide introduces you to the authentication and authorization methods that you will use to connect to Shopify's APIs.

You can use Shopify CLI to generate a starter app with boilerplate code that handles authentication and authorization. The starter app includes code for an embedded app that follows app best practices:

You should use this starter app unless you need to scaffold an app that is not embedded.

To learn more about the authentication and authorization methods that you can use for Shopify apps, and the libraries that you can use to simplify your implementation, refer to authentication and authorization.

The Storefront API supports both tokenless and token-based access. For token-based access, requests require a valid Shopify access token. The following types of tokens are available:

Apps can have a maximum of 100 active storefront access tokens per shop.

Public access tokens enable your app to make Storefront API requests from public contexts like a browser. With public access, capacity scales with the number of buyers based on customer IP. In most cases, this is the IP of someone browsing your site or using your mobile app. Learn more about Storefront API rate limits.

To use public access, you need to create a public access token for your app by making a request to the GraphQL Admin API's storefrontAccessTokenCreate mutation. Alternatively, you can create a custom app in the Shopify admin, and retrieve your Storefront API access token and manage access scopes from there.

To query the Storefront API with a public access token, include it as an X-Shopify-Storefront-Access-Token header on all client-side requests.

Private access tokens let you make authenticated, server-side queries to the Storefront API.

Caution

Unlike public access tokens, private access tokens should be treated as secret and not used on the client-side. We recommend only requesting the scopes that your app needs, to reduce the security risk if the token leaks.

To start using private access, you can use the following methods:

To query the Storefront API with a private access token:

  1. Include the Shopify-Storefront-Private-Token header with the access token.

In some cases, a request to the Storefront API isn't linked to buyer traffic, such as during a static site build, however when making server-side requests to the Storefront API as a result of buyer traffic, be sure to also:

  1. Include the Shopify-Storefront-Buyer-IP (case-sensitive) header with the IP address of the buyer. This allows Shopify to accurately enforce IP-level bot and platform protection, to help your storefront manage traffic from a single user consuming a high level of capacity, such as a bot.
Caution

Failure to include the Shopify-Storefront-Buyer-IP (case-sensitive) header, can result in sub-optimal user experiences, including throttled API requests, limited Bot Protection, and unauthenticated flows at checkout as Shopify will not be able to differentiate requests from different buyers.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4