Using Basic Auth with Custom Action

I am trying to use Basic Auth with a custom action but I am not sure how to pass in the username and password.

For example using curl I would do this:

curl --user myuser:mypass https://mysite.com/wp-json/wp/v2/users/me

Or in Python I would do it like this

import requests
r = requests.get('mysite.com', auth=('myuser', 'mypass'))

Hi @nathanfcg

Create input and link it.

Hi could you sbow me a screenshot please as I dont know where the username and password should go

Hi @nathanfcg,

Did you try putting into the URL something like:

https://myuser:mypass@mysite.com/wp-json/wp/v2/users/me

User credentials are allowed in URL for HTTP Basic Auth.

Best,
Victor.