/userGet the authenticated user
OAuth app tokens and personal access tokens (classic) need the read:user scope, or the broader user scope, for this endpoint to return the private user response. The private user response includes additional fields such as private_gists, total_private_repos, owned_private_repos, disk_usage, collaborators, and two_factor_authentication. Tokens without these scopes receive the public user response.
The private and public user response types are unrelated to the private profile setting. A token without scopes still authenticates as the token's owner, so values subject to private profile visibility, such as followers and following, may differ from an unauthenticated response.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
A 401 is returned: Requires authentication. A 403 is returned: Forbidden.
Was this helpful?