This endpoint is accessible with the user
scope.
octokit.users.addEmailForAuthenticated({emails,});
name | required | description |
---|---|---|
emails | yes | Adds one or more email addresses to your GitHub account. Must contain at least one email address. Note: Alternatively, you can pass a single email address or an |
See also: GitHub Developer Guide documentation.
octokit.users.block({username,});
name | required | description |
---|---|---|
username | yes |
See also: GitHub Developer Guide documentation.
octokit.users.checkBlocked({username,});
name | required | description |
---|---|---|
username | yes |
See also: GitHub Developer Guide documentation.
octokit.users.checkFollowingForUser({username,target_user,});
name | required | description |
---|---|---|
username | yes | |
target_user | yes |
See also: GitHub Developer Guide documentation.
octokit.users.checkPersonIsFollowedByAuthenticated({username,});
name | required | description |
---|---|---|
username | yes |
See also: GitHub Developer Guide documentation.
Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:gpg_key
scope.
octokit.users.createGpgKeyForAuthenticated({armored_public_key,});
name | required | description |
---|---|---|
armored_public_key | yes | A GPG key in ASCII-armored format. |
See also: GitHub Developer Guide documentation.
Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:public_key
scope.
octokit.users.createPublicSshKeyForAuthenticated({key,});
name | required | description |
---|---|---|
title | no | A descriptive name for the new key. |
key | yes | The public SSH key to add to your GitHub account. |
See also: GitHub Developer Guide documentation.
This endpoint is accessible with the user
scope.
octokit.users.deleteEmailForAuthenticated({emails,});
name | required | description |
---|---|---|
emails | yes | Email addresses associated with the GitHub user account. |
See also: GitHub Developer Guide documentation.
Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:gpg_key
scope.
octokit.users.deleteGpgKeyForAuthenticated({gpg_key_id,});
name | required | description |
---|---|---|
gpg_key_id | yes | gpg_key_id parameter |
See also: GitHub Developer Guide documentation.
Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:public_key
scope.
octokit.users.deletePublicSshKeyForAuthenticated({key_id,});
name | required | description |
---|---|---|
key_id | yes | key_id parameter |
See also: GitHub Developer Guide documentation.
Note that you'll need to set Content-Length
to zero when calling out to this endpoint. For more information, see "HTTP verbs."
Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow
scope.
octokit.users.follow({username,});
name | required | description |
---|---|---|
username | yes |
See also: GitHub Developer Guide documentation.
If the authenticated user is authenticated through basic authentication or OAuth with the user
scope, then the response lists public and private profile information.
If the authenticated user is authenticated through OAuth without the user
scope, then the response lists only public profile information.
octokit.users.getAuthenticated();
This endpoint has no parameters
See also: GitHub Developer Guide documentation.
Provides publicly available information about someone with a GitHub account.
GitHub Apps with the Plan
user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "Identifying and authorizing users for GitHub Apps" for details about authentication. For an example response, see 'Response with GitHub plan information' below"
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".
octokit.users.getByUsername({username,});
name | required | description |
---|---|---|
username | yes |
See also: GitHub Developer Guide documentation.
Provides hovercard information when authenticated through basic auth or OAuth with the repo
scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
The subject_type
and subject_id
parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about octocat
who owns the Spoon-Knife
repository via cURL, it would look like this:
curl -u username:tokenhttps://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192
octokit.users.getContextForUser({username,});
name | required | description |
---|---|---|
username | yes | |
subject_type | no | Identifies which additional information you'd like to receive about the person's hovercard. Can be |
subject_id | no | Uses the ID for the |
See also: GitHub Developer Guide documentation.
View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key
scope.
octokit.users.getGpgKeyForAuthenticated({gpg_key_id,});
name | required | description |
---|---|---|
gpg_key_id | yes | gpg_key_id parameter |
See also: GitHub Developer Guide documentation.
View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key
scope.
octokit.users.getPublicSshKeyForAuthenticated({key_id,});
name | required | description |
---|---|---|
key_id | yes | key_id parameter |
See also: GitHub Developer Guide documentation.
Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts.
Note: Pagination is powered exclusively by the since
parameter. Use the Link header to get the URL for the next page of users.
octokit.users.list();
name | required | description |
---|---|---|
since | no | A user ID. Only return users with an ID greater than this ID. |
per_page | no | Results per page (max 100) |
See also: GitHub Developer Guide documentation.
List the users you've blocked on your personal account.
octokit.users.listBlockedByAuthenticated();
This endpoint has no parameters
See also: GitHub Developer Guide documentation.
Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the user:email
scope.
octokit.users.listEmailsForAuthenticated();
name | required | description |
---|---|---|
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the people who the authenticated user follows.
octokit.users.listFollowedByAuthenticated();
name | required | description |
---|---|---|
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the people following the authenticated user.
octokit.users.listFollowersForAuthenticatedUser();
name | required | description |
---|---|---|
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the people following the specified user.
octokit.users.listFollowersForUser({username,});
name | required | description |
---|---|---|
username | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the people who the specified user follows.
octokit.users.listFollowingForUser({username,});
name | required | description |
---|---|---|
username | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key
scope.
octokit.users.listGpgKeysForAuthenticated();
name | required | description |
---|---|---|
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the GPG keys for a user. This information is accessible by anyone.
octokit.users.listGpgKeysForUser({username,});
name | required | description |
---|---|---|
username | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists your publicly visible email address, which you can set with the Set primary email visibility for the authenticated user endpoint. This endpoint is accessible with the user:email
scope.
octokit.users.listPublicEmailsForAuthenticated();
name | required | description |
---|---|---|
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the verified public SSH keys for a user. This is accessible by anyone.
octokit.users.listPublicKeysForUser({username,});
name | required | description |
---|---|---|
username | yes | |
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key
scope.
octokit.users.listPublicSshKeysForAuthenticated();
name | required | description |
---|---|---|
per_page | no | Results per page (max 100) |
page | no | Page number of the results to fetch. |
See also: GitHub Developer Guide documentation.
Sets the visibility for your primary email addresses.
octokit.users.setPrimaryEmailVisibilityForAuthenticated({email,visibility,});
name | required | description |
---|---|---|
yes | An email address associated with the GitHub user account to manage. | |
visibility | yes | Denotes whether an email is publically visible. |
See also: GitHub Developer Guide documentation.
octokit.users.unblock({username,});
name | required | description |
---|---|---|
username | yes |
See also: GitHub Developer Guide documentation.
Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow
scope.
octokit.users.unfollow({username,});
name | required | description |
---|---|---|
username | yes |
See also: GitHub Developer Guide documentation.
Note: If your email is set to private and you send an email
parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.
octokit.users.updateAuthenticated();
name | required | description |
---|---|---|
name | no | The new name of the user. |
no | The publicly visible email address of the user. | |
blog | no | The new blog URL of the user. |
twitter_username | no | The new Twitter username of the user. |
company | no | The new company of the user. |
location | no | The new location of the user. |
hireable | no | The new hiring availability of the user. |
bio | no | The new short biography of the user. |
See also: GitHub Developer Guide documentation.