@mallory_cormier
You can check if a Shopify session has expired by using the Shopify API or by checking the session cookies in your browser.
Using the Shopify API:
- Make a GET request to the admin/shop.json endpoint using the appropriate API credentials. This will return the shop details if the session is valid.
- If the API request returns an HTTP 200 status code, the session is valid. Otherwise, if it returns a 401 or 403 status code, the session has expired.
Checking session cookies:
- Open your browser's developer tools (usually by pressing F12 or right-clicking and selecting "Inspect").
- Go to the "Application" or "Storage" tab (depending on your browser).
- Expand the "Cookies" section.
- Look for cookies named "secure_customer_sig" or "_shopify_sa_p".
- If the cookies are missing or their values are not valid, the session has expired.
Note that the specific method may vary depending on your development environment and the browser you are using.