I am using the postman for the check the REST API Call in WooCommerce. When I call the Woocommerce Defaults API. It displays the error like.
{
"code": "woocommerce_rest_cannot_create",
"message": "Sorry, you are not allowed to create resources.",
"data": {
"status": 401
}
}
The above error displays when the Basic Authentication and POST method of Create Customers API.
And when I am Trying to Call the Display products API with the cURL
http://example.com/wp-json/wc/v2/products
Using the GET Methods from postman it will display the following error.
{
"code": "woocommerce_rest_cannot_view",
"message": "Sorry, you cannot list resources.",
"data": {
"status": 401
}
}
It would be great if anyone saving me from this headache. Thanks..