Auth0 Home Blog Docs

Object didn’t pass validation format user id


Does anyone know how to fix error 401 when I use the api to call the get user profile endpoint?

It says error 401 invaild_uri

The url is

I’m new to this and need help on fixing this error.


can you explain more of what you want to do and how are you doing it? The endpoint you mentioned require the authentication header to be present etc. How are you creating the management client to call this url?


I hope this helps.

I am following the steps on this page. I am trying to get the full user profile to extract IdP access token for facebook:

I am at step two on this page. I am clicking on the Get a user endpoint of the management api :!/Users/get_users_by_id

This is where I am getting stuck. Everytime I try to call the get a full user endpoint the response comes back as an invalid_uri


Are you providing the authorization token as mentioned here?


Yes but I am using python.


Can you share a code snippet you’re using?


import http.client

conn = http.client.HTTPSConnection("")

headers = { ‘authorization’: “Bearer YOUR_ACCESS_TOKEN” }

conn.request(“GET”, “/”, headers=headers)

res = conn.getresponse()
data =


That’s what I am typing. Not sure if that’s correct.


where are you getting YOUR_ACCESS_TOKEN from?


From here:


Can you try with regular curl to make sure it works? Are you regenerating the token each time? It might be that the token is expired.


Yes I have regenerated the token. But I will try with curl.


I am using this curl command but I keep getting an error.
curl --request GET
–url ‘
–header ‘authorization: Bearer YOUR_ACCESS_TOKEN’

The error says curl: (6) could not resolve host
curl: (1) protocol " 'https" not supported or disabled in libcurl