![]() ![]() If you are using PHP-FPM before 7.2.0, you have to to use the HTTP_AUTHORIZATION header like This does only work if your PHP environment supports the getallheaders() function. If this is the case, we will set the HTTPS environment variable. We are now looking if the Authorization header is present in the client’s HTTP request. This is the base64-encoded sample for my local test environment:Īuthorization: Basic Y2tfYjY2Nzc1NzZiMmI2NzIxODJiMTVhNGYwM2Y4NmNlYjliOGMxYzgxNzpjc19mNzA3ZDA4ZDEwMzM4NDRkODEwNTZlMDYxY2QxOTgzODY3NTQ2MjNk Your previous CLI command might look like the following code:Ĭurl -i -u $ ""Ĭurl passes the credentials as an HTTP Authorization request header to the webserver. When calling the REST endpoint with curl or wget. "message": "Sorry, you cannot list resources.", ![]() After you have generated both, you might receive the error WooCommerce uses a Consumer Key and Consumer Secret as credentials. ![]() WooCommerce provides an extensive REST API with which you can automate your WordPress WooCommerce shop. WooCommerce returns an HTTP 401 error if you are not using HTTPS or the Authorization header is not parsed correctly by your webserver. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |