How to get the user id after authentication?

Hello, it returns:

{
    "error": "Unauthorized",
    "status": 401,
    "message": "Must provide a valid Client-ID or OAuth token"
}

With your example and applying it to my application