I have been working on pulling my shops data through to a SQL server using the API
I have hit a problem when trying to fulfill a request via the api
I get a status code 302 returned with
<html><body>You are being <a href="https://xxxxxxx.myshopify.com/admin/auth/login">redirected</a>.</body></html>
Im not sure what i need to do to get this to work
I tried the same request via postman and it worked so i have the correct id's etc
Im hopinh someone has seen this before
Hey @jayteasuk ,
If you are sending an API request to Shopify, and in the response you are getting an HTML page with a link to the Shopify login page, that means that the authentication set up in your API request is incorrect.
I would make sure that you are properly authenticating your API requests with the correct tokens or credentials (https://shopify.dev/concepts/about-apis/authentication).
Also one thing that might be in play here, if you are able to make GET requests but not POST requests, is that Shopify prevents you from using HTTP Basic Auth for POST requests that have cookies: https://community.shopify.com/c/API-Announcements/Shopify-now-prevents-HTTP-Basic-Auth-POST-requests...
Hassain | Developer Support Specialist @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution