How to Handle Multiple API Calls Using App Proxy in Shopify Theme App Extensions?

Topic summary

A developer is building a Shopify app with Theme App Extensions and needs to implement App Proxy to hide their backend API URL from client-side code.

Current Implementation:

  • Making direct fetch calls to app URL endpoints for wishlist operations and product data
  • Endpoints include: /api/wishlist, /api/plpwishlist, /api/getwishlist, and /api/getProductTags
  • Passing parameters like customerId, productId, shop, and variantId

Seeking Guidance On:

  • Routing multiple API calls through App Proxy to prevent URL exposure
  • Proper configuration and management of multiple API endpoints within the proxy setup

Status: Question remains unanswered with no responses yet.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

Hi all,

I am developing a Shopify app using Theme App Extensions and I want to handle multiple API calls using the App Proxy feature. Currently, I am directly using the app URL to fetch data, like so:

fetch(${appUrl}/api/wishlist?customerId=${customerId}&productId=${productId}&shop=${shop}&variantId=${variantId});

fetch(${appUrl}/api/plpwishlist?customerId=${customerId}&shop=${shop}&productIds=${productIds.join(',')});

const wishlistRes = await fetch(${appUrl}/api/getwishlist?customerId=${customerId}&shop=${shop});

const tagRes = await fetch(${appUrl}/api/getProductTags?shop=${shop});

I want to implement this using the App Proxy feature in Shopify, so the app URL is not exposed to the client. How should I go about handling this? Specifically, I need to:

Ensure the API calls are routed through the App Proxy to hide the backend API URL.

Properly manage the API endpoints for multiple requests.

Could someone guide me on how to configure this correctly with App Proxy?

1 Like