Documentation Index
Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
Use this file to discover all available pages before exploring further.
OAuth 2.0 Authentication
LaunchMyStore uses OAuth 2.0 for secure app authentication. This allows merchants to grant your app specific permissions without sharing their credentials.OAuth Flow
Available Scopes
Request only the scopes your app needs. Merchants see all requested scopes during installation.Store Data
| Scope | Description |
|---|---|
read_shop | View store information |
write_shop | Modify store settings |
read_products | View products and variants |
write_products | Create, update, delete products |
read_collections | View collections |
write_collections | Manage collections |
Orders & Customers
| Scope | Description |
|---|---|
read_orders | View orders and transactions |
write_orders | Create, update, fulfill orders |
read_customers | View customer data |
write_customers | Create, update customers |
read_fulfillments | View fulfillment data |
write_fulfillments | Create, update fulfillments |
Inventory & Discounts
| Scope | Description |
|---|---|
read_inventory | View inventory levels |
write_inventory | Adjust inventory |
read_discounts | View discount codes |
write_discounts | Create, manage discounts |
Metafields
| Scope | Description |
|---|---|
read_metafields | View metafield data |
write_metafields | Create, update metafields |
Authorization Request
Redirect merchants to the authorization URL:Parameters
| Parameter | Required | Description |
|---|---|---|
client_id | Yes | Your app’s Client ID |
scope | Yes | Comma-separated list of scopes |
redirect_uri | Yes | Your callback URL (must match registered URL) |
state | Recommended | Random string to prevent CSRF attacks |
Example
Token Exchange
After the merchant approves, they’re redirected to yourredirect_uri with a code parameter. Exchange this for tokens:
Response
Token Refresh
Access tokens expire after 24 hours. Use the refresh token to get a new access token:Making Authenticated Requests
Include the access token in theAuthorization header:
Security Best Practices
Store tokens securely
Store tokens securely
Never store tokens in client-side code or version control. Use encrypted database columns or a secrets manager.
Validate the state parameter
Validate the state parameter
Always validate that the
state parameter in the callback matches what you sent. This prevents CSRF attacks.Handle token expiration
Handle token expiration
Implement automatic token refresh before making API calls. Check
expires_in and refresh proactively.Request minimal scopes
Request minimal scopes
Only request the permissions your app actually needs. Merchants are more likely to install apps with fewer permissions.