Ecommerce Shopify WordPress Discussion

I get a 401 message woocommerce_rest_cannot_view

Using Postman with Bearer authorization and using the following URL: https://website.nl/wp-json/wc/v3/orders I get this error message: { "code": "woocommerce_rest_cannot_view", "message": "Je kunt gegevensbronnen niet weergeven.", "data": { "status": 401 } } This is the code I want to use: function fetchOrderData(orderNumber) { return new Promise(function(resolve, reject) { var apiUrl = 'https://website.nl/wp-json/wc/v3/orders?order_number=' + orderNumber; fetch(apiUrl, { headers: { 'Authorization': 'Bearer token' } }) .then(response => { if (!response.ok) { throw new Error('Failed to fetch order details'); } return response.json(); }) .then(orderDetails => { if (orderDetails && orderDetails.length > 0) { var customerInfo = orderDetails[0].billing; resolve(customerInfo); } else { reject(new Error('Order not found')); } }) .catch(error => { console.error('Error fetching order data:', error); reject(error); }); }); } The user is the 'shopmanager' with the Bearer authorization. No specific settings set in Woocommerce. I make use of a nginx server. I checked many things like: Bearer Token, token permissions, API Endpoint URL, API version, plugin conflicts, etc. How can i solve the 401 error? Looking forward for the solution.
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.