I am trying to display the Stack Overflow reputation of an user in my project. I have the user email. So with user email as input can i get the user's Stack Overflow reputation?
Now i tried using Javascript SDK. Used authenticate method of Stack Overflow. In this case , user must login into Stack Overflow, then i got user's Stack Overflow id and reputation.
Answer questions posted on StackOverflow. If you want to earn more reputation in a shorter period, post answers on the topic you are expert in. The more your answers(of course the quality ones) are, the more reputation you will earn. Also, make sure that you follow the SO guidelines while answering the question.
Hans Passant - 634k (Stack Overflow)
For privacy reasons email addresses are not available in the stack exchange-api. They are neither available in the data explorer or the datadumps. As far as I know you won't be able to query the database based on the email address.
By authentication you can find the user based on it's id or using the /me functionality.
Regarding the updates of the reputation, I believe you could use a cron job that updates the reputation on a daily basis.
Depending on how you want to represent the reputation, you could also consider using the Flair option which is provided by Stack Exchange itself. Flairs are small images that depict a summary of the user and shows his/her reputation. These flairs are updated every 24-36 hours by SE and can be accessed by the url: https://stackoverflow.com/users/flair/user_id_here.png
You can get the user's reputation through an stack overflow api:
https://stackoverflow.com/users/flair/<user_id>.json
and it returns a json string (take myself as an example)
{
"id":7360676,
"gravatarHtml":{},
"badgeHtml":"<span title=\"3 silver badges\" aria-hidden=\"true\"><span class=\"badge2\">●</span><span class=\"badgecount\">3</span></span><span class=\"v-visible-sr\">3 silver badges</span><span title=\"14 bronze badges\" aria-hidden=\"true\"><span class=\"badge3\">●</span><span class=\"badgecount\">14</span></span><span class=\"v-visible-sr\">14 bronze badges</span>",
"reputation":"341",
"displayName":"Justin Lee",
"profileUrl":"https://stackoverflow.com/users/7360676/justin-lee"
}
simply read the reputation
field from the return of this api, and you will get the user's stack overflow reputation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With