Hello everyone,
I do have problems in connecting my Shopify Admin REST -API via my own Server. Postman seems fine, with only the Access-Token.
What’s wrong with my Code-Snippet? Did I use the wrong credentials?
It is structured like this:
var settings = {
“url”: [email removed]
“method”: “POST”,
“timeout”: 0,
“headers”: {
“Content-Type”: “json/application”,
“Authorization”: “Basic *******”
},
“data”: " {"custom_collection": {\r\n "title": "MacbooksTEST123456",\r\n "body_html": "Description of the collection", \n "sort_order": "manual", \n "template_suffix": "your_template_suffix", \n "published_scope": "web"\r\n }}",
};
Therefore it looks like that:
var settings = {
“url”: “110a2*****:sh***@shop*****.myshopify.com/admin/api/2023-10/custom_collections”,
“method”: “POST”,
“timeout”: 0,
“headers”: {
“Content-Type”: “json/application”,
“Authorization”: “Basic MTEwYTJiZWU1YjN********”
},
“data”: " {"custom_collection": {\r\n "title": "MacbooksTEST123456",\r\n "body_html": "Description of the collection", \n "sort_order": "manual", \n "template_suffix": "your_template_suffix", \n "published_scope": "web"\r\n }}",
};
When I send my request in Postman, I receive a 200 Response and get redirected to the Login page of my shop, but nothing been uploaded/updated actually.
Here’s my (anonymous) credentials:
API credentials
API key (=username)
110a***
API secret key
a41e***
API apiEndpointURL
https://shop***.myshopify.com/
Client credentials
Client ID
1bf1**
Client secret
d34**
Help’s appreciated very much!
All the Best!
Patrick