I'm unable to fetch anything from the Wakatime API, and I don't know what is wrong.
The Documentation states:
Authentication to the API can be done using HTTP Basic Auth or by adding your api key as a query parameter in your request url like
?api_key=XXXX
. Using HTTP Basic Auth, your username is your API key base64 encoded. Your password is not needed to authenticate.For example, when using HTTP Basic Auth with an API key of 12345 you should add this header to your request:
Authorization: Basic MTIzNDU=
I'm using HTTParty to handle the request:
HTTParty.get('https://wakatime.com/api/v1/users/@theminijohn?api_key=XXX')
But this returns:
{
"error": "Not found"
}
What am I doing wrong?
- --> Wakatime API
- --> Api key: XXX
- --> username: theminijohn - https://wakatime.com/@theminijohn