Reputation: 199
Their is a strange 401 error comes in basic rest APIs. For example:
I have already checked and trouble shoot following steps.
1- Enable the legacy REST API is checked
2- I have made new rest api and applied the same consumer key
3- I created new admin and tried
4- I replace htaccess with default wordpress
5- I have upgrade both wordpress and woocommerce version to latest
6- I have disabled all other plugins
But none of the things work still, rest every thing is working fine but rest-API authentication for woocommerce does not
Upvotes: 1
Views: 6628
Reputation: 199
I got the solution below, posted here: WooCommerce - woocommerce_rest_cannot_view - Status 401
The 401 error you are getting is because you are using basic auth even though your website is not secure (does not have https). The solution in postman is to use OAuth 1.0. Just add the consumer key and consumer secret and send the request.
Upvotes: 6