You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add a button in the theme.
Use case: Click on the button changes the value of a metafield attached to an order, and I'll get the new value of the metafield
shown on the page.
Solution I managed to put together so far:
Create a theme app extension: in the liquid containing the button, there's an api call to an endpoint (/app/xxx/status) like you are doing in the product reviews sample app.
Create an App proxy that exposes the above endpoint and defines the logic for it: calls the Admin API to get the metafield
Problem:
The request from the store is not going through: I have the authentication problem below :
What is the problem you are facing?
Hello,
I'm trying to add a button in the theme.
Use case: Click on the button changes the value of a metafield attached to an order, and I'll get the new value of the metafield
shown on the page.
Solution I managed to put together so far:
Problem:
https://mystore.myshopify.com/api/auth?oseid=xxxxxxx&shop=mystore.myshopify.com 404
Code:
I am using thee same logic as the generated code :
app.get("/api/products/count", async (_req, res) => {
const countData = await shopify.api.rest.Product.count({
session: res.locals.shopify.session,
});
res.status(200).send(countData);
});
and then calling this endpoint from the theme extension.
Question:
How can I see the logs of my app ?
How can I get this request go through ?
How to authenticate the request coming from the store to the app proxy then to the Admin API?
Is there an example to accomplish this ?
Regards
Describe the solution you'd like to see
I won't to see my app responding with 200 ok
Anything else?
No response
The text was updated successfully, but these errors were encountered: