To clarify what the problem is and how to solve it, firstly I thought someone will face the same problem as me, so I don't think any code is needed as this is basically a very self-explanatory error saying that the session token has expired and you What else do you want?
This error occurs because Shopify is running the application in an Iframe, and the token making the request does not match, so you must manually add the token to the request. I recommend always getting the token when calling the method since the token will change for a while each time. I've added some code examples of how I handle it using Vue.js, Laravel, Inertia.js, Axios
To clarify what the problem is and how to solve it, firstly I thought someone will face the same problem as me, so I don't think any code is needed as this is basically a very self-explanatory error saying that the session token has expired and you What else do you want?
This error occurs because Shopify is running the application in an Iframe, and the token making the request does not match, so you must manually add the token to the request. I recommend always getting the token when calling the method since the token will change for a while each time. I've added some code examples of how I handle it using Vue.js, Laravel, Inertia.js, Axios
This is in my app.blade.php, I found it on Osiset github, not sure if this is the best solution https://github.com/osiset/laravel-shopify/issues/594
Alternatively, you can disable the csrf token (not recommended)