harnex
harnex

Reputation: 1123

Where can I find the GitHub ID in my account?

What is the difference between GitHub username and GitHub ID? I was asked for my Github ID for a certain project and I happened to give my username. But the person is unable to find me on GitHub with my username. So I got a GitHub ID from the below URL:

http://caius.github.io/github_id/

But I'm unable to find this ID from my account directly. Where can I find this in my GitHub account? It would be great to elaborate on this.

Upvotes: 111

Views: 322679

Answers (10)

Gtarafdar
Gtarafdar

Reputation: 41

Only this method is working,

  1. Go to your GitHub account and click on the Settings option.

  2. Go to the emails section.Your id is listed there.

  3. The format is:

    {id}+{user_name}@users.noreply.github.com

Upvotes: 3

ashish Singh
ashish Singh

Reputation: 11

You can find your GitHub ID on https://github.com/settings/emails.

Upvotes: 0

Bohemian
Bohemian

Reputation: 425258

From the command line:

curl -s https://api.github.com/users/<your-user-name> | jq '.id'

Upvotes: 10

Ogglas
Ogglas

Reputation: 70176

If you do have the GitHub Id but need to find the username / login you can do it like this with the List users endpoint:

Subtract the id by 1 and run the following query. My GitHub Id is 4015237 and therefore the query parameter since receives the value 4015236.

https://api.github.com/users?since=4015236&per_page=1

https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#list-users

Description for since:

Query parameters - since - A user ID. Only return users with an ID greater than this ID.

enter image description here

Upvotes: 3

MikeL
MikeL

Reputation: 2894

From this answer

If you cannot use the API answer or from http://caius.github.io/github_id/ you can go to github --> settings --> emails, under the Primary email address you will find {id}+{user_name}@users.noreply.github.com.

This is at least true if you have Keep my email address private checked.
I have this text in the Keep my email address private explanation, and I'm guessing this will be there even if it is turned off.

Look for 'noreply' in the emails section.

Upvotes: 5

Sreeja Ghosh
Sreeja Ghosh

Reputation: 71

Step-1: Go to this link: https://caius.github.io/github_id/

Step-2 Enter your Github username

You got it!

The second method is:

  1. Go to your GitHub account and click on the Settings option.
  2. Go to the emails section.
  3. You id is listed there. The format is: {id}+{user_name}@users.noreply.github.com

Upvotes: 3

Michael
Michael

Reputation: 88

Don't use the ID stated in other answers I tried this and it didn't work and said it was invalid on AWS.

It's located on the main GIT repository. Those random letters and numbers are below the add file button with no description, obviously. Not only that but it's clickable if you click into it you'll find a much longer commit ID. You want the longer one.

Everyone loves completely unnecessary complexity in a platform!!

Upvotes: -2

Blessing
Blessing

Reputation: 2720

It can be easily retrieved using Github API. If you cannot use the API answer or from http://caius.github.io/github_id/ you can go to github --> settings --> emails , under the Primary email address you will find {id}+{user_name}@users.noreply.github.com. The format is simillar to this: [email protected], that 50826640 is the id.

Upvotes: 6

anon
anon

Reputation:

It can be easily retrieved using GitHub API:

https://api.github.com/users/your_github_user_name

where instead of your_github_user_name you must use the desired GitHub username.


Example:
https://api.github.com/users/github

Upvotes: 192

Raghu Ariga
Raghu Ariga

Reputation: 1129

It can be easily retrieved using Github API.

Example: https://api.github.com/users/username

enter image description here

Upvotes: 44

Related Questions