Closed richardaubin closed 1 year ago
I have created an application password on my administrator's user account. I have secured my endpoint using a 3rd party wordpress plugin.
When I run the following in my app
var uri = "https://url"; var username = "administrator"; var password = "applicationpassword"; var route = "wp/v2/customendpoint";
var client= new WordPressClient(uri); client.Auth.UserBasicAuth(username, password);
When I execute this, I get an authentication error:
client.CustomRequest.GetAsync<List>(route);
But if I test the api/username/password through https://reqbin.com/ it passes the authentication check.
This tells me that I'm not using this library correctly or there's something wrong with how it's sending the username/password.
Found the problem, on my end... needed to change to (route, false, true) to useAuth.
I have created an application password on my administrator's user account. I have secured my endpoint using a 3rd party wordpress plugin.
When I run the following in my app
var uri = "https://url"; var username = "administrator"; var password = "applicationpassword"; var route = "wp/v2/customendpoint";
var client= new WordPressClient(uri); client.Auth.UserBasicAuth(username, password);
When I execute this, I get an authentication error:
client.CustomRequest.GetAsync<List>(route);
But if I test the api/username/password through https://reqbin.com/ it passes the authentication check.
This tells me that I'm not using this library correctly or there's something wrong with how it's sending the username/password.