Issue with API Call for Creating Shopify Checkout Session

Topic summary

  • Issue: A custom Node.js app integrated with a Shopify store fails when attempting to create a checkout session via the Shopify API.

  • Errors observed: “Redirected 10 times. Aborting” and “Response code 401 (Unauthorized).” These suggest a redirect loop and an authentication/authorization failure.

  • Troubleshooting done: Tried different Shopify API versions. Verified request format and parameters.

  • Context shared: A specific segment of the Node.js server code making the checkout creation request was provided and is central to diagnosing the issue.

  • Ask: Looking for insights into likely causes of the repeated redirects and 401, and guidance on how to resolve them.

  • Status: Unresolved; no decisions or fixes reported yet.

Summarized with AI on January 11. AI used: gpt-5.

Hi shopify,

I’m encountering an issue with an API call in a custom Node.js app integrated with my Shopify store. Specifically, the problem arises when trying to create a checkout session using the Shopify AP

  • Error Received: “Redirected 10 times. Aborting” and “Response code 401 (Unauthorized)”

What I’ve Done:

  1. Tried using different Shopify API versions.
  2. Checked the request format and parameters.

This is the specific segment of my Node.js server code where I’m attempting to create a Shopify checkout session. I’m encountering errors related to redirection and unauthorized access. Any insights into what might be causing these issues or how to resolve them would be greatly appreciated:

Thanks!