Why am I getting a Postman error when connecting to the Shopify Rest API?

Solved

Why am I getting a Postman error when connecting to the Shopify Rest API?

ropstech
Visitor
2 1 0

Hello Community,

 

I have set up countless API's for other shop systems, but somehow can't manage to set it up correctly for Shopify.

Normally I use postman to test it and have followed instructions to create an app (Admin API integration) and installed it successfully bases on the Shopify docs. API-Version is 2023-07.

 

Simple GET request: 
https://{{api_key}}:{{api_secret_key}}@{{store_name}}.myshopify.com/admin/api/{{api_version}}/orders.json

In terms of authorization, I tried Basic Auth, Bearer Token as well as API Key and passing "X-Shopify-Access-Token" with the {{api_access_token}} in the header. I also switched {{api_secret_key}} and {{api_access_token}} in all mentioned method but still no success.

For the example request above, I simply get:

{
    "errors": "Not Found"
}

If I use the request:
https://{{store_name}}}.myshopify.com/admin/api/2023-07/products.json,
I get the following body:

<html>

<head>
	<title>400 Bad Request</title>
</head>

<body>
	<center>
		<h1>400 Bad Request</h1>
	</center>
	<hr>
	<center>cloudflare</center>
</body>

</html>


I read through many discussions on this site, as well as third party forums. I opened this question, hoping to find guidance and instructions for other people with the same problem in the future. 

Any ideas?

Thankful for any advice on that one.


Cheers,
Robin

 

Accepted Solution (1)

ropstech
Visitor
2 1 0

This is an accepted solution.

Solution

 

Anyone coming along this post, I found the solution to a more or less stupid mistake from of my own.

I used the store name from the Store details in the Shopify backend settings. This name was stored as the {{store_name}} variable in my API calls. Just today I realized that tthe actual storename can be found inside the admin url ("https://admin.shopify.com/store/actual_storename/settings/general")

 

As soon as I updated the variable, everthing runs smoothly.

View solution in original post

Reply 1 (1)

ropstech
Visitor
2 1 0

This is an accepted solution.

Solution

 

Anyone coming along this post, I found the solution to a more or less stupid mistake from of my own.

I used the store name from the Store details in the Shopify backend settings. This name was stored as the {{store_name}} variable in my API calls. Just today I realized that tthe actual storename can be found inside the admin url ("https://admin.shopify.com/store/actual_storename/settings/general")

 

As soon as I updated the variable, everthing runs smoothly.