when I do https://my-domain.com/wp-json/wp/v2/users, Post reqest,
here is curl: –
curl –location ‘https://my-domain.com/wp-json/wp/v2/users’
–header ‘X-WP-Nounce: d4d5b62b9e’
–header ‘Cookie: wordpress_logged_in_6bc8b9c935f36f677c51733800cace1e’
–header ‘Content-Type: application/json’
–data-raw ‘{
“nickname”: “Test”,
“email”: “[email protected]”,
“phone_number”: “9876567845”,
“username”: “[email protected]”,
“password”: “Test@123”,
“first_name”: “Test”,
“last_name”: “User”
}’
I get:
{
"code": "rest_cannot_create_user",
"message": "Sorry, you are not allowed to create new users.",
"data": {
"status": 401
}
}
I am using postman. Please help me to figure out this.
Akash Boghani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.