Brian Ruff
Brian Ruff

Reputation: 137

For a Shopify App, should we be using 'shop_id' or 'shop_url' to keep track of user accounts?

For a Shopify App, should we be using 'shop_id' or 'shop_url' to keep track of user accounts?

The 'shop_url' account is easily accessible, but I'm wondering if this is a reliable field (does the shop_url every change if a user attaches a domain name or contacts suppport?). There is also a 'shop_id' variable but it seems to require extra API calls and makes me question if I should be using 'shop_id' or 'shop_url'. How do other Shopify App developers keep track of their customer accounts? Do you use the 'shop_url' as the 'key' in your database?

Upvotes: 0

Views: 234

Answers (1)

David Lazar
David Lazar

Reputation: 11427

Everyone without fail will use the store name. That combo *.myshopify.com. It is unique to a store, and is handed to every call made to an App. shop=drunkmonkey.myshopify.com for example. No ID. Nothing else is used, just that parameter.

Upvotes: 1

Related Questions