jose2
May 2, 2021, 9:54am
1
I am using the Management API to try to update an user metadata.
I am using this endpoint:
Update a User
When I send my PATCH request I get the following answer from Auth0:
{"statusCode":400,"error":"Bad Request","message":"Payload validation error: '{message}'.","errorCode":"invalid_body"}
However, I am using a body according to the example of the API doc:
{
"user_metadata": { "a" : "b" }
}
What’s wrong?
supun
May 3, 2021, 2:38am
2
Hi @jose2 ,
Welcome to the Auth0 community!
Are you setting the Content-Type: application/json
header to your update request?
1 Like
jose2
May 3, 2021, 7:37am
3
Yes, I found out right after writing the question that that was the problem. Please close this ticket.
jose2, thanks for reporting this error. I ran into this today and had no clue what’s causing the problem since the error message is (still) broken:
"Payload validation error: '{message}'."
if it matters, I got this error from the “Create User” API method, not “Update User” like jose2 did