github-readme-stats: [BREAKING CHANGE] WakaTime Stats API Changes
The Problem
As pointed in #863 seems like wakatime changed their public API and now we can only access the resources only if the requests is authenticated.
That’s why while fetching the data it throws “FOBIDDEN” error and we cannot fetch the data.
Solution
So to fix this issue I think it would be nicer if we utilize wakatime’s embeddable share feature https://wakatime.com/share/embed
Benefits of this feature is that
- No need of authentication
- Super nice JSON responses
- Users are can change how much data they need to show (last_7_days, last_30_days etc etc)
- Lot of options to customize without us needing to tinker around with the response data
Usage
- First users would visit https://wakatime.com/share/embed
- Select “languages”
- And generate the embed code

After than it will give you HTML code like this:

And just simply copy past the highlighted part of the string intro github readme stats url
https://github-readme-stats.vercel.app/api/wakatime?shareid=yourusername/6c3e4875-6301-4b7e-955f-9251e06c7d95
And that’s it.
But there’s a catch
As I noticed this json response only shows percentage data and does not provides us with time data about the languages.
@alanhamlett can you help us with this issue?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (6 by maintainers)
Commits related to this issue
- fix: wakatime stats fetcher (#871) fixes #865 — committed to Kab1r/github-readme-stats by anuraghazra 6 years ago
- fix: wakatime stats fetcher (#871) fixes #865 — committed to Tom-Beijner/github-readme-stats by anuraghazra 6 years ago
- fix: wakatime stats fetcher (#871) fixes #865 — committed to necofuryai/github-readme-stats by necofuryai 6 years ago
- fix: wakatime stats fetcher (#871) fixes #865 — committed to xhayper/github-readme-stats by anuraghazra 6 years ago
Hey @SP-XD @FC5570 @LFGaming @LevraGav the fix has been deployed and you can try it out now. (note that we have cache so if you see no changes, just add
&v=2at the end of the url to bust the cache)Yeah it’s working now, thank you very much guys @anuraghazra @SP-XD
The public time range is customizable, and @anuraghazra has selected to show
all_timepublicly instead of the defaultlast_7_days. Changing the time range works: https://wakatime.com/api/v1/users/LevraGav/stats/all_timeTo fix this, just remove the time range from the url and the user’s default preference will be used: https://wakatime.com/api/v1/users/LevraGav/stats
i have already checked those two boxes and it’s still not showing up (:
Kinda facing a prob with wakatime… i used this:
I also tried the embeded thing:
I do have the all time set n all
So, I have no idea what am i doing wrong
I have tried this method, but it still wont work for me (: https://github-readme-stats.vercel.app/api/wakatime?shareid=LevraGav/604dd95a-d933-42e8-9c87-e3b6c7c61293 @anuraghazra
Oh Ops!
Seems like wakatime api is fine and github-readme-stats is fine too!
@LevraGav @FC5570
Seems like in #863 the issue was that in your wakatime profile settings you did not checked these options so we cannot fetch your data
Check these checkboxes and it should work just fine.