How to access Custom App API from Theme App extension ?

Shopify Partner
3 0 3

Created a Custom App and Theme App extension -> App Block
Configured the App Proxy
Trying to make API call from App Block ( app.js ) to the Custom App backend (Node) API.

The API calls are returning 302/304 status codes

Following error is shown on Custom App terminal

2023-01-18 13:53:48 | backend | [shopify-app/INFO] Running validateAuthenticatedSession
2023-01-18 13:53:48 | backend | [shopify-app/INFO] Session was not valid. Redirecting to /api/auth? | {shop:}
2023-01-18 13:53:48 | backend | [shopify-api/ERROR] Missing Authorization header, was the request made with authenticatedFetch? | {isOnline: false}

How to get the authentication token from Theme App Extension( App Block app.js ) ?

Replies 3 (3)

Shopify Partner
12 1 7

Hi, maybe do you find a solution?:)

Shopify Partner
90 3 8


1. your app has checking the every request is authenticated. 
2. your malware or any app logic also checking the app proxy request is authenticated.
(Solution ). So you need to pass the auth token from app.js that was out side from the app. so you need a custom your app logs to validate the authenticated request.
debuging hits -  all the your request goes to app auth flow you can check with app  debug log.



Shopify Partner
15 0 1

do you find solution I am getting same error