For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
I have created a theme app extension.
and i created a proxy that handles the requests from the theme app to my server and it works.
im verfying the requests with the package : "shopify-verify-app-proxy-middleware". and it works well.
my problem now is that when I want to send a request to the shopify REST or Graphql, i need to add a session, and i just dont understand where can i get it from the proxy request.
usually i just get it like : "res.locals.shopify.session"
but i just cant find it on requests that were made from a theme app extension.
Please help 🙂
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Sounds great!
I will try to store the access token in my DB,
should i store the whole "res.locals.shopify.session"
or just the accessToken from inside it ?
Are you able to figure it out? I am also looking a way to get session from fetch requests in theam extension.
For now i store the res.locals.shopify.session in my db and i just fetch it and use it.
but im not sure if it stays availble unlimited
Can we connect brother? I am also working on a similar project. My email: sazzal77@gmail.com.
I use the same res. local. Shopify. session token, it works.
But, have to tried a way to create a token? I use the res. local.Shopify. session from the embedded app.