How to use shopify online store proxy on hydrogen

Hi everyone! I’m new with shopify and need help

I want to call a custom app’s API through a proxy with hydrogen. Is there any way possible?

Online Store .myshopify.com/apps/test/ - it works

Hydrogen Store .com/apps/test/ - it doesn’t work

Can anyone please help me? Thanks for response

1 Like

Hello @chipmunk6699 ,

By default, Hydrogen is not supposed to have the app proxy.
However, if you are creating a custom app, I think you can just expose an API that allows the Hydrogen storefront to retrieve data using the loader/action function without needing to use a proxy.

3 Likes

Many thanks

Hello,

It’s absolutly what I have to do. I’m making a custom app for subscriptions plans and need to create an API to get access the Subscription API (only available in custom apps).

The useless question for expert is : how can I make an API in my custom app ? I’d like to be able to make a customer portal with Hydrogen but get some issues.

Thanks in advance for your feedback !

Simon

Are you calling the api client side or in the loader?

In the loader its supposed to work, in client side you need to update the CSP