Register
-
Hi dear plugin author,
I want to create user with rest api could you please help me out how can do it.The page I need help with: [log in to see the link]
-
Hi @coderswift,
Thanks for reaching out.
Surely, you can create the user in WordPress via REST API using the default wp/v2/users endpoint provided by WordPress itself along with our plugin’s authentication. Below is how you can do it –
- You can use the API mentioned here.
- Now, for the above API, you need to authenticate and authorize it, so you can use any of our plugin’s secure authentication method to pass the authorization.
Let us know if this helps or if you have any questions. We’d be happy to assist you.
Thanks,
Team miniOrangeI already use but api provide the response with this error.
{
“status”: “error”,
“error”: “MISSING_AUTHORIZATION_HEADER”,
“code”: “401”,
“error_description”: “Authorization header not received. Either authorization header was not sent or it was removed by your server due to security reasons.”
}
Thank YouHi @coderswift,
Thanks for getting back to us.
To resolve this error, can you please provide me with the following details?
- Sample API request format you are making?
- On which server your WordPress site is hosted – Apache or Nginx?
Thanks,
Team miniOrangeapache may be
https://staging1.caioterra.com/test.php
Check the configuration on above urlThanks for confirming that your server is Apache.
Now, can you share the API request format you are making which is resulting into an error message?
Thanks,
Team miniOrangeHere is the Curl Code that hit the Endpoint. I will provide you with more details if it requires to investigation
curl –location ‘https://staging1.caioterra.com/wp-json/wp/v2/users’ \
–header ‘Authorization: Basic base64(meddy12asasas@yopmail.com:123456asasas)’ \
–header ‘Content-Type: application/json’ \
–data-raw ‘{
“username”:”meddy12asasas@yopmail.com”,
“password”:123456
}’Thanks for sharing the details.
We tested it out and seems currently, you have enabled JWT authentication in the plugin, please make sure that you have chosen the Basic Authentication method, then make the same request again.
Also please make sure to pass the username and password of the user having the administrator role as only the administrator will be able to create the user as per WordPress.
Thanks,
Team miniOrangeIt still doesn’t work for me.
curl –location ‘https://staging1.caioterra.com/wp-json/wp/v2/users’ \
–header ‘Content-Type: application/json’ \
–header ‘Authorization: Basic cmVueW1vbjo4NWNHNTF6ZVJUZk9kOFRDUEMkZjhKU0A=’ \
–data-raw ‘{
“username”:”meddy12asasas@yopmail.com”,
“password”:123456
}’It seems you have still not enabled the Basic Authentication from the plugin’s UI. Can you please check again and make sure that you are following this guide to configure the Basic Authentication?
Thanks,
Team miniOrangeHi @coderswift,
We have not heard back from you in a while, so assuming that you are able to make things work for you. Hence, we are marking this thread as closed but please feel free to create a new thread if you still have any questions. We’d be happy to assist.
Thanks,
Team miniOrange
- The topic ‘Register’ is closed to new replies.