Step 4. Setup for using Customer Account API (/account route)
Setup for using Customer Account API (/account section)
Requirements
You have Apps and channels permissions on the Shopify store that you're working with.
Step 1: Enable Customer Account API access
To use the Customer Account API, you first need to enable it and get your access credentials.
From your Shopify admin, under Sales channels, click Headless or Hydrogen.
Select your storefront.
Complete one of the following steps:
If you selected Headless, then navigate to Customer Account API settings.
If you selected, Hydrogen, then navigate to Storefront settings.
Optional: Modify the client type.
Public clients: For applications that are strictly client-side, or that don't have a server-side session where to store the refresh token safely (for example, SPA, mobile applications, or Hydrogen).
Confidential clients: For applications that have a back-end to perform the authorization request and a server-side session to hold the refresh token (for example, Express.js, ASP.NET, or Rails).
From the Credentials section, copy the client ID (and client secret, if applicable) to use in your requests.
Step 2: Enable the new customer account experience
Shopify's new customer account experience is required to use the Customer Account API. New customer accounts allow you to seamlessly persist customer logins across online store, Hydrogen, and checkout.
From your Shopify admin, click Settings.
Click Customer accounts
Under Accounts in online store and checkout section, click on Edit
Choose New customer accounts
Click Save.
Last updated