GET/user/{account_id}

Get a user using their ID

Provides publicly available information about someone with a GitHub account. This method takes their durable user ID instead of their login, which can change over time.

If you are requesting information about an Enterprise Managed User, or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a 404 Not Found status.

The email key in the following response is the publicly visible email address from your GitHub profile page. When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for email, then it will have a value of null. You only see publicly visible email addresses when authenticated with GitHub. For more information, see Authentication.

The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see Emails API.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
account_idintegerrequired
account_id parameter

2 status codes
200Response
loginstringrequired
idintegerrequired
user_view_typestringoptional
node_idstringrequired
avatar_urlstringrequired
gravatar_idstringrequired
urlstringrequired
html_urlstringrequired
followers_urlstringrequired
following_urlstringrequired
gists_urlstringrequired
starred_urlstringrequired
subscriptions_urlstringrequired
organizations_urlstringrequired
repos_urlstringrequired
events_urlstringrequired
received_events_urlstringrequired
typestringrequired
site_adminbooleanrequired
namestringrequired
companystringrequired
blogstringrequired
locationstringrequired
emailstringrequired
notification_emailstringoptional
hireablebooleanrequired
biostringrequired
twitter_usernamestringoptional
public_reposintegerrequired
public_gistsintegerrequired
followersintegerrequired
followingintegerrequired
created_atstringrequired
updated_atstringrequired
private_gistsintegerrequired
total_private_reposintegerrequired
owned_private_reposintegerrequired
disk_usageintegerrequired
collaboratorsintegerrequired
two_factor_authenticationbooleanrequired
planobjectoptional
business_plusbooleanoptional
ldap_dnstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned: Resource not found.

Was this helpful?