Missing body params in requests via shopify app proxy

Hi,

My app is based on the current (2022-10-04) example node Shopify App from the docs, I’ve got a real basic express handler for a particular POST request but the body params are missing when I POST to this endpoint.

query string params work, but, **req.body** is completely blank!

I have tried sending both **application/json** and **application/x-www-form-urlencoded** types.

Sending a query string works fine & comes back with the additional Shopify parameters such as: logged_in_customer_id, timestamp etc

I cannot find anything substantial on google/stackoverflow/shopify forms forgive me if this has been covered before.

Any suggestions would be really helpful, thanks!

Hi there,

This is once my problem and i literally got sicked because of this LOL

I just missed a middleware in my app.js or index.js in your app if you are using nodejs

just add

app.use(express.json());
and you will be able to access req.body

maybe its different in php but fore sure its the same concept

hope it helps

Thanks for the tip, I’ll give this a shot next time I’m working on that app.

Sorry to hear what happened to you. Hope you got sorted somewhere else rather quickly.