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 if someone could elaborate on this.
Thank You.
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
It can be easily retrieved using Github API.
Example: https://api.github.com/users/username
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: 50826640+hirwablessing#users.noreply.github.com, that 50826640 is the id.
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.
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.
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!!
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:
Go to your GitHub account and click on the Settings option.
Go to the emails section.
You id is listed there. The format is:
{id}+{user_name}#users.noreply.github.com
Related
I use tt_products 2.7.18 on TYPO3 6.2.25.
I configured orderEmail_to to the admins email address.
When an order is placed the customer and the admin gets a respective email - as expected.
But when I change the tracking status, only the customer gets an email.
The manual does not tell me how to configure and I'm starting to question the possibility altogether.
Can anyone tell me if and how to configure?
Thanks in advance.
plugin.tt_products {
...
orderEmail_to = admin#emaildomain.com
...
}
It is correct to set the orderEmail_to. You should check in the TypoScript Object Browser (backend module Template) that this setup is applied on your tracking page id, where in this example I have given "admin#emaildomain.com" as the admin's email address.
Only the tracking status numbers between 50 and 59 will send a notification email to the customer.
tt_products 2.7.27 is already available. Maybe your version 2.7.18 is already outdated.
Is there a way to get the numeric company ID from the URL of a company page on Linkedin? This ID is the one I'll use to query the Linkedin API and get more information on the company.
I need to get the ID from the information provided with the URL, to use it to get the rest of the information related to the company page.
It seems unusual to me that you need to dig in the HTML code to get the company ID you need to use to interact using the Linkedin API, so correct me if I'm wrong.
I know there have been similar request handlers, but I'm wondering why there isn't a handler available to get the company ID like there is to get the profile id from its url:
https://api.linkedin.com/v1/people/url=xxxx
I know there is the search company handler, but that is a text based research and I found myself with some inconsistent results from time to time.
I don't want to crawl the company page for the ID since I get blacklisted by Linkedin if I do it too many times from the same IP address.
I am aware of these answers:
how to get companies id from linkedin jsapi
How to get the company id from Linkedin Company URL in PHP?
LinkedIn API for Company Directory
But they seem outdated or marginally related to what I ask and since LI API has changed much over the past year, if there was any development on this.
EDIT: added more info on the kind of ID I am looking for. I had erroneously marked #display's answer as correct but unfortunately it's not what I am looking for. I am referring to the companyId that I'd use to query the Linkedin API concerning that company.
June 2020 Update
Most of the above methods no longer work, including using the jobs page URL and hovering over search results. The 2019 update by #rinogo almost works. To make it easier, paste this script into the console. Of course, updates from LinkedIn may case this to fail eventually.
(() => {
const name = document.location.pathname.replace(/^\/[^\/]*\/([^\/]*)\/?/, '$1');
for (let json of Array.from(document.querySelectorAll('code'))) {
try {json = JSON.parse(json.innerText);} catch (e) {json = null;}
if (json && json.included) {
for (let incl of json.included) {
if (incl.universalName === name && incl.objectUrn) {
return 'Company ID for [' + incl.universalName + '] is [' + incl.objectUrn.substr('urn:li:company:'.length) + ']';
}
}
}
}
return 'Company ID not found';
})();
2020 update
Please see Whatabrain's answer.
2019 update
Arbitrary Pages
The solutions provided previously are outdated. The following is not the best solution, but it will work in a pinch. It does require "crawling", unfortunately. (I know this doesn't answer OP's question, but it should help others who arrive here since this is the top Google result)
View the HTML source for the "home page" of the company whose ID you are trying to discover. Search for the string, https://www.linkedin.com/company/. The first instance of this string on the page is followed immediately by the company ID.
You can verify that you have the right company ID by visiting the entire link (including the Company ID), e.g. https://www.linkedin.com/company/123456.
If this approach stops working at some point, please comment below and I'll update this answer.
UPDATE: I'm using the strategy today (7/2/2019) and am finding that the last instance is currently more reliable due to some changes made by LinkedIn. Ultimately, the overall strategy remains sound. View the source and find some repeatable way to search for the company ID. It may take some experimentation to find a reliable approach.
Pages with admin rights
If you have admin rights to the Page, finding the Company ID is trivial. While signed in, visit your Company Page. The Company ID is used right within the URL.
For example:
Admin URL for Company Page: https://www.linkedin.com/company/123123123/admin/
Company ID: 123123123
Or, you can of course use the API to find the Company ID for any Company Page of which you are an admin.
We can obtain the company id from the url of a company page. For this we must have a valid linkedin account.
Once you are in the company page, just check the url
https://www.linkedin.com/company/123456
The numbers given as 123456 is the respective company id.
Hope that you meant this company id.
The way I got the ID is by going to the page, and clicking "View Jobs" (as long as they have some).
Then the URL will have the ID on it:
https://www.linkedin.com/jobs/search?locationId=OTHERS.worldwide&f_C=12345678
To find your LinkedIn company ID:
Open LinkedIn in a new tab
In your search results, select your company page.
Navigate to the URL at the top of your company page.
Copy the number immediately following 'www.linkedin.com/company/' but before the question mark.
Solution provided by: https://support.klipfolio.com/hc/en-us/articles/216181827-Use-LinkedIn-as-a-data-source
Anyone still looking a solution, please follow:
Go to https://developer.linkedin.com/plugins/company-profile
Type the name of the company in the Company Name box and it will suggest the name.
Once you select the Company page, click on Get Code button.
You will get the company page id with data-id.
Screenshot:
Successfully used this method 2/27/2019.
Search for the company in LinkedIn.com
When located in search window, HOVER over the company name.
Locate ID at the bottom showing where the URL will direct.
Hovered over company name in top arrow, gathered ID in displayed URL at bottom arrow
I have a much easier solution that works! (15/01/2019)
Go to the company's page e.g. https://www.linkedin.com/company/something
Then view the source (CTRL+U in Chrome). Search for the expression "company/". The second match contains the ID! Have fun.
Is there a way to make a Jire email handler ignore the From field in an email and go for a custom tag instead? I know I could work with the API instead but that's in the pipe. this is a temporary solution that will be used until a more robust system is built.
To clarify what we have today:
Email is sent to inbox, (hr#company.com)
Jira picks is up and creates an issue.
Jira looks at the From field and creates a uses if none exist.
What we're trying to achieve:
Form is filled out, and an area is chosen (hr, facilities etc.).
Form is posted to an API that creates an email (basically a no-reply adress over SMTP) and sends it to the appropriate inbox (for example hr#company.com).
Email lands in the inbox and Jira looks in it and creates an issue in project or label 'HR'.
Jira now looks in the email and finds custom tags named [user] and [user-email] (or something) and creates a user from the tag.
Example email
From: no-reply#company.com
To: hr#company.com
Subject: Some problem
Body: Explanation of problem
Have a good day!
/Mike
[user:"Michael Smith"]
[userEmail:"michael.smith#company.com"]
If we were to implement this system now, we would loose the possibility to create new users because all emails would come from the same "no-reply" adress.
I have searched in the Atlassian forums and such, but with no luck. Have not found anything in the official documentation, but I fear that I might be looking in the wrong place.
I hope that I'm being clear, and that someone has any idea if it is possible.
Thank you!
You need to write your own plugin and create your own Mailhandler.
For example you can use a regex which looks for the tag
[userEmail:"michael.smith#company.com"] and retrieve the emailadress from the string. Do the same for the [user]-tag, if the user doesn't exist.
Here is a tutorial that shows how to create and setup custom Message Handlers:
https://developer.atlassian.com/jiradev/jira-platform/guides/email/tutorial-custom-message-mail-handler-for-jira#Tutorial-Custommessage(mail)handlerforJIRA-Step7:Implementarealmessagehandlerback-end
The rest should be easy from here.
The API documented here - http://developer.yammer.com/restapi/#rest-users clearly states:
"4) Alias to /api/v1/users/current user’s id.format. Supports include_followed_users, include_followed_tags, and include_group_memberships parameters.
GET https://www.yammer.com/api/v1/users/by_email.json?email=user#domain.com`
Yet, when we try this, it does not return any followed user information at all! The request we're using is like so:
https://www.yammer.com/api/v1/users/by_email.json?email=me#company.com&include_followed_users=true
However, this request DOES return followed users, but only for the current user:
https://www.yammer.com/api/v1/users/current.json?include_followed_users=true
Am I missing something completely obvious and being stupid or is there a real issue here? If this was taken out for whatever reason, then you'd have thought that the API documentation would have been updated.
The Yammer Team did eventually get back to me on this. Their response below:
(I've removed https://www.yammer.com from URLs because I don't have enough rep' to post more links)
Hey Jason Dunbar looks like the documentation here is wrong.
I looked in to this and had some conversations with a few engineers this week and have the following (albeit more arduous workaround):
1) Call get user by email endpoint and retrieve the id attribute from here: /api/v1/users/by_email.json?email=user…
2) To grab following users, take that id and:
GET /api/v1/users/following/[:id].json
3) To grab group memberships for that user you'll need to impersonate him/her (verified admin only) and
GET /api/v1/users/current.json
We'll get the documentation updated ASAP with this. Also happy to keep the conversation going to help if needed.
Make sure you are setting the email parameter to the user's email that they are registered with.
E.G. if your company has multiple domains but the Yammer network is under bigco.com and the user is registered with an email under bigcosubsidiary.com you'll need to make a request to the API with user#bigcosubsidiary.com.
-as mentioned - it looks like its only for current.json - you can check it here http://yammer-dev.herokuapp.com/endpoints/4 - hope it helps.
Rich
Need help on GitHub usage. I wonder if there is a way to communicate with a github.com user i.e. write the user a message when only username/id is given on their GitHub page? Does GitHub have this social feature?
Although GitHub removed the private messaging feature, there's still an alternative.
GitHub host git repositories. If the user you're willing to communicate with has ever committed some code, there are good chances you may reach your goal. Indeed, within each commit is stored some information about the author of the change or the one who accepted it.
Provided you're really dying to exchange with user user_test
Display the public activity page of the user: https://github.com/user_test?tab=activity
Search for an event stating "user_test pushed to [branch] at [repository]". There are usually good chances, they may have pushed one of his own commits. Ensure this is the case by clicking on the "View comparison..." link and make sure the user is listed as one of the committers.
Clone on your local machine the repository they pushed to: git clone https://github.com/..../repository.git
Checkout the branch they pushed to: git checkout [branch]
Display the latest commits: git log -50
As a committer/author, an email should be displayed along with the commit data.
Note: Every warning related to unsolicited email should apply there. Do not spam.
This method was working as of Jan 2023
Copy and paste the next line into your browser (feel free to
bookmark it): https://api.github.com/users/xxxxxxx/events/public
Find the GitHub username for which you want the email. Replace the
xxxxxxx in the URL with the person's GitHub username. Hit Enter.
Press Ctrl+F and search for “email”.
As suggested by qbolec, the above steps can be done by using this snippet:
<input id=username type="text" placeholder="github username or repo link">
<button onclick="fetch(`https://api.github.com/users/${username.value.replace(/^.*com[/]([^/]*).*$/,'$1')}/events/public`).then(e=> e.json()).then(e => [...new Set([].concat.apply([],e.filter(x => x.type==='PushEvent').map(x => x.payload.commits.map(c => c.author.email)))).values()]).then(x => results.innerText = x)">GO</button>
<div id=results></div>
Source: Matthew Ferree # Sourcecon
Simply create a dummy repo, open a new issue and use #xxxxx to notify the affected user.
If user has notification via e-mail enabled they will get an e-mail, if not they will notice on next login.
No need to search for e-mail address in commits or activity stream and privacy is respected.
For lazy people, like me, a snippet based on Nikhil's solution
<input id=username type="text" placeholder="github username or repo link">
<button onclick="fetch(`https://api.github.com/users/${username.value.replace(/^.*com[/]([^/]*).*$/,'$1')}/events/public`).then(e=> e.json()).then(e => [...new Set([].concat.apply([],e.filter(x => x.type==='PushEvent').map(x => x.payload.commits.map(c => c.author.email)))).values()]).then(x => results.innerText = x)">GO</button>
<div id=results></div>
Github said on April 3rd 2012 :
Today we're removing two features. They've been gathering dust for a while and it's time to throw them out : Fork Queue & Private Messaging
Source
Here is another way:
Browse someone's commit history (Click commits which is next to branch to see the whole commit history)
Click the commit that with the person's username because there might be so many of them
Then you should see the web address has a hash concatenated to the URL. Add .patch to this commit URL
You will probably see the person's email address there
Example: https://github.com/[username]/[reponame]/commit/[hash].patch
Source: Chris Herron # Sourcecon
Besides the removal of the github messaging service, usage was often not necessary due to many githubbers communicating with- and advocating twitter.
The advantage is that there is:
full transparency
better coverage
better search features for tweets
better archiving, for instance by the US Library of Congress
It is probably no coincidence that stackoverflow doesn't allow private messaging either, to ensure full transparency. The entire messaging issue is thoroughly discussed on meta-stackoverflow here.
Does GitHub have this social feature?
If the commit email is kept private, GitHub now (July 2020) proposes:
Users and organizations can now add Twitter usernames to their GitHub profiles
You can now add your Twitter username to your GitHub profile directly from your profile page, via profile settings, and also the REST API.
We've also added the latest changes:
Organization admins can now add Twitter usernames to their profile via organization profile settings and the REST API.
All users are now able to see Twitter usernames on user and organization profiles, as well as via the REST and GraphQL APIs.
When sponsorable maintainers and organizations add Twitter usernames to their profiles, we'll encourage new sponsors to include that Twitter username when they share their sponsorships on Twitter.
That could be a workaround to leave a message to a GitHub user.
Simplest solution that worked for me very well is just to put the username of that particular user or repository link of corresponding user!
<input id=username type="text" placeholder="Github Username or Repo link">
<button onclick="fetch(`https://api.github.com/users/${username.value.replace(/^.*com[/]([^/]*).*$/,'$1')}/events/public`).then(e=> e.json()).then(e => [...new Set([].concat.apply([],e.filter(x => x.type==='PushEvent').map(x => x.payload.commits.map(c => c.author.email)))).values()]).then(x => results.innerText = x)">GO, Get email!</button>
<div id=results></div>