RealComposer

Shopify Safe & Unsafe Practices

Direct Answer

Shopify Storefront API public access tokens are designed for clients and only expose storefront data. Admin API access tokens (shpat_) and app client secrets are server-only. Verify the X-Shopify-Hmac-Sha256 header on every webhook before trusting it.

Credentials & Where They Belong

Client safe
Storefront API public access token

Reads products and creates carts with storefront-level permissions.

Server only
Admin API access token (shpat_)

Reads and edits orders, customers, inventory, and settings.

Server only
App client secret

Signs webhooks and completes OAuth installs.

Safe Practices

  • Use the Storefront API for client reads

    Products, collections, and carts should come from Storefront, not the Admin API.

  • Verify webhook HMACs with the raw body

    Compute the base64 HMAC-SHA256 with your client secret and compare in constant time.

  • Request minimal Admin scopes

    Use read_products instead of write_products unless the integration edits the catalog.

Unsafe Practices

  • Using an Admin API token in a theme or headless frontend

    Anyone could read customer data or edit orders and prices.

  • Trusting webhook payloads without HMAC checks

    Attackers can post fake orders/paid events to your endpoint.

The RealComposer Pattern

Keep the Admin token in the vault for inventory and order lookups, cache catalog responses at the edge, and slim product payloads before they reach mobile clients.

START BUILDING FREE

Frequently Asked Questions

Q:Can I expose the Shopify Storefront token?

Yes, the public Storefront token is intended for clients. Use a private Storefront token only on servers.

Stitch contentful entries with shopify products api

Contentful marketing fields plus Shopify SKU inventory in parallel. For "stitch contentful entries with shopify products api", store CONTENTFUL_ACCESS_TOKEN, SHOPIFY_ACCESS_TOKEN in Secret Vault, call https://cdn.contentful.com/spaces/{{query.spaceId}}/entries from a Worker, and let Next.js / React hit only https://realcomposer.com/v1/workspace/stitch-contentful-with-shopify-products with an rc_live_ client token.

Sub-10ms edgeView Recipe
Multi-API Aggregation

Merge cloudinary with shopify product images

Shopify product media plus Cloudinary derived URLs in one feed. For "merge cloudinary with shopify product images", store CLOUDINARY_BASIC_AUTH, SHOPIFY_ACCESS_TOKEN in Secret Vault, call https://api.cloudinary.com/v1_1/{{secrets.CLOUDINARY_CLOUD_NAME}}/resources/image from a Worker, and let React hit only https://realcomposer.com/v1/workspace/merge-cloudinary-with-shopify-images with an rc_live_ client token.

Sub-10ms edgeView Recipe
Multi-API Aggregation

Combine mailchimp with shopify customer tags

Shopify customer tags and Mailchimp list membership for segmentation UI. For "combine mailchimp with shopify customer tags", store MAILCHIMP_BASIC_AUTH, SHOPIFY_ACCESS_TOKEN in Secret Vault, call https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10 from a Worker, and let Bubble.io hit only https://realcomposer.com/v1/workspace/combine-mailchimp-with-shopify-tags with an rc_live_ client token.

Sub-10ms edgeView Recipe

Related Concepts