skip to Main Content

I’m new to shopify apps. I created app by shopify cli command. Now when I’m running the app and trying to hit an endpoint it’s throwing bellow error.

enter image description here

can anyone please help me to understand what is going on. My ngrok is up and running and especially I’m just trying to run an endpoint from browser and the endpoint looks like this.

http://localhost:51928/api/products/count

Please help, Thanks in advance.

2

Answers


  1. The big hint is in the error message. Your call is failing to provide the shop. So with no Shop, you have no auth. No auth, nothing works. Shopify ALWAYS sends the shop parameter. So whatever you are doing here, you’re not, so you need to ensure you do.

    Login or Signup to reply.
  2. There is a similar question on another stack. But David is correct, Nick are missing a few parameters, create-api-in-shopify-public-app-and-call-it-in-postman.

    Adding on, there is an Authorization header. The auth is a Bearer token with a timestamp, you’d need to generate a new bearer token fairly quickly before the auth is no longer valid

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search