Ecommerce Shopify WordPress Discussion

Shopify 401 Authentication issue Upload

I've created a private app in the Shopify Admin area. Download and upload work fine in Postman, but from my server, only the download works. When trying to upload data, I receive a 401 status code, and the shop data (categories) remain unchanged. Can anyone tell me what might be causing this? Could it be related to outdated SSL certificates, or have I missed something fundamental regarding authentication? I've attached my code (JavaScript and comments) for reference: // Produces 400 + 401 function uploadCategoriesSFY() { var settings = { "url": "https://shop123456.myshopify.com/admin/api/2023-10/custom_collections.json", //"url": "https://110a...:321@shop123456.myshopify.com/admin/api/2023-10/custom_collections.json", // Also returns a 401 "method": "POST", "timeout": 0, "headers": { "X-Shopify-Access-Token": "sh.._de1123....", //"X-Shopify-Access-Token" produces a 401 /* Fri Feb 16 15:05:05 CET 2024: API RESPONSE: { "responseCode": 401, "errorResponse": "{errors:[API] Invalid API key or access token (unrecognized login or wrong password)}" } */ "Authorization": "Basic 456..", /* * // Authorization in the header produces a 400 Fri Feb 16 15:02:30 CET 2024: API RESPONSE: { "responseCode": 400, "errorResponse": "{errors:{custom_collection:Required parameter missing or invalid}}" } */ "Content-Type": "application/json" }, "data": JSON.stringify({ "custom_collection": { "title": "SSLTEST", "body_html": "Description of the collection", "sort_order": "manual", "template_suffix": "your_template_suffix", "published_scope": "web" } }) }; } Try different combinations of my API credentials. Even basic Authentication. Same results.
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.