Initiates the OAuth 2.0 authorization flow for Shopify’s Customer Account API. This endpoint is used when a customer wants to grant the subscription app access to their Shopify customer account data.
What is Customer Account API? Shopify’s Customer Account API allows apps to access customer data (orders, addresses, payment methods) on behalf of the customer. This requires customer consent through an OAuth flow.
How it works:
Important Notes:
Authentication: Customer must be logged in via Shopify customer session
curl --request POST \
--url https://www.myshop.com/apps/subscriptions/cp/api/customer-account-api/initiate \
--header 'Content-Type: application/json' \
--data '
{
"returnUrl": "https://myshop.com/account/subscriptions"
}
'{
"authorizationUrl": "https://shopify.com/12345/auth/oauth/authorize?client_id=...",
"state": "random-state-value-for-csrf-protection"
}Documentation Index
Fetch the complete documentation index at: https://appstleinc-aeca3e0a.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
OAuth initiation request with return URL
OAuth flow initiated successfully
curl --request POST \
--url https://www.myshop.com/apps/subscriptions/cp/api/customer-account-api/initiate \
--header 'Content-Type: application/json' \
--data '
{
"returnUrl": "https://myshop.com/account/subscriptions"
}
'{
"authorizationUrl": "https://shopify.com/12345/auth/oauth/authorize?client_id=...",
"state": "random-state-value-for-csrf-protection"
}