You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set up a local WordPress server running on localhost (in my case, I used http://localhost:8777)
Using WooCommerce.NET, construct a new RestAPI class with url set to http://127.0.0.1:8777/wp-json/wc/v3/ and pass in a correct key and secret.
Create a WCObject and call wc.Customer.GetAll() to get the error.
Note if you replace http://127.0.0.1:8777/wp-json/wc/v3/ with http://localhost:8777/wp-json/wc/v3/, authentication works correctly. My guess is that the OAuth signature on the server is always calced using localhost while WooCommerce.NET uses 127.0.0.1 when generating the signature before making the request.
Details of the error message if there is any
The error message from the server call is as follows:
System.Net.WebException: '{"code":"woocommerce_rest_authentication_error","message":"Invalid signature - provided signature does not match.","data":{"status":401}}'
The text was updated successfully, but these errors were encountered:
Version Information
Steps to replicate the issue
http://127.0.0.1:8777/wp-json/wc/v3/
and pass in a correct key and secret.Note if you replace
http://127.0.0.1:8777/wp-json/wc/v3/
withhttp://localhost:8777/wp-json/wc/v3/
, authentication works correctly. My guess is that the OAuth signature on the server is always calced usinglocalhost
while WooCommerce.NET uses127.0.0.1
when generating the signature before making the request.Details of the error message if there is any
The error message from the server call is as follows:
The text was updated successfully, but these errors were encountered: