Reference
Shopify
Connect Shopify to Alter Vault for secure API access
Overview
Section titled “Overview”Use a Shopify Admin API access token to make authenticated Admin API calls through Alter Vault without exposing the token in code.
| Property | Value |
|---|---|
| Provider ID | shopify |
| Category | E-commerce |
| Credential Type | API Key |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”Open the custom app in the Shopify admin
In the Shopify admin go to Settings > Apps and sales channels > Develop apps and open the existing custom app. Shopify’s legacy custom app guide covers these apps.
Copy the Admin API access token
On the API credentials tab, copy the Admin API access token (starts with shpat_). It is shown once, at install time; if it was not saved, uninstall and reinstall the app to get a new one.
Note the store subdomain
Note the store subdomain (for example your-store from your-store.myshopify.com).
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”Open the Developer Portal
Go to portal.alterauth.com and navigate to the application.
Add Shopify
Go to Managed Secrets > Add Provider > Shopify.
Enter credentials
Paste your Admin API Access Token into the credential field, and enter your store subdomain (e.g. your-store) in the Store Subdomain field.
Save
Click Save. You’ll receive a grant_id to use with the SDK.
Using in Code
Section titled “Using in Code”response = await alter_app.request( HttpMethod.GET, "https://your-store.myshopify.com/admin/api/YOUR_API_VERSION/products.json", grant_id="YOUR_GRANT_ID",)Policy-cataloged operations
Section titled “Policy-cataloged operations”Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.
| Operation ID | Families | Method | Provider path |
|---|---|---|---|
orders/cancel | admin, delete, payment | POST | /admin/api/{api_version}/orders/{order_id}/cancel.json |
orders/create | admin, payment | POST | /admin/api/{api_version}/orders.json |
customers/create | admin, write | POST | /admin/api/{api_version}/customers.json |
graphql | admin, delete, payment, read, send, write | POST | /admin/api/{api_version}/graphql.json |
products/create | admin, write | POST | /admin/api/{api_version}/products.json |
webhooks/create | admin, write | POST | /admin/api/{api_version}/webhooks.json |
customers/list | read | GET | /admin/api/{api_version}/customers.json |
customers/search | read | GET | /admin/api/{api_version}/customers/search.json |
inventory_levels/list | read | GET | /admin/api/{api_version}/inventory_levels.json |
orders/list | read | GET | /admin/api/{api_version}/orders.json |
products/count | read | GET | /admin/api/{api_version}/products/count.json |
products/list | read | GET | /admin/api/{api_version}/products.json |
shop/get | read | GET | /admin/api/{api_version}/shop.json |
variants/list | read | GET | /admin/api/{api_version}/products/{product_id}/variants.json |
webhooks/list | read | GET | /admin/api/{api_version}/webhooks.json |