Object didn't pass validation for format user-id: 5bcdd68e49b84629ca644761, "errorCode":"invalid_uri"

{“statusCode”:400,“error”:“Bad Request”,“message”:“Path validation error: ‘Object didn’t pass validation for format user-id: 5989c52cc164ea2039b45976’ on property id (The user_id of the user to update).”,“errorCode”:“invalid_uri”}

I am getting the above error when trying to update a user via the Management API via curl.

curl -H “Authorization: Bearer API_TOKEN” -X PATCH -H “Content-Type: application/json” -d ‘{“email_verified”:true}’ https://stg-helloinspire.auth0.com/api/v2/users/5989c52cc164ea2039b45976

Figured it out.

I wasn’t including auth0 in the user id. It should have been:

curl -H “Authorization: Bearer API_TOKEN” -X PATCH -H “Content-Type: application/json” -d ‘{“email_verified”:true}’ https://stg-helloinspire.auth0.com/api/v2/users/auth0|5989c52cc164ea2039b45976

6 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.