Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WakaTime] [ERROR] Invalid API Key (104); Make sure your API Key is correct! for Version 24.0.10 #341

Closed
MarkLester10 opened this issue Apr 16, 2023 · 7 comments

Comments

@MarkLester10
Copy link

MarkLester10 commented Apr 16, 2023

I am using VSCODE Extension for wakatime and I am setting my api key thru VSCode but it keeps showing error saying Invalid API Key (104); Make sure your API Key is correct!. I already generated new api key from my WAKA TIME profile settings.

@alanhamlett
Copy link
Member

I had to invalidate your api key because it was shared publicly here. If you go to https://wakatime.com/api-key and copy/paste your new key into vscode-wakatime's api key setting does it work?

@MarkLester10
Copy link
Author

MarkLester10 commented Apr 25, 2023

I had to invalidate your api key because it was shared publicly here. If you go to https://wakatime.com/api-key and copy/paste your new key into vscode-wakatime's api key setting does it work?

still have the same error, Invalid API key, I reinstall the extension and generate api key and the same problem occurs

@alanhamlett
Copy link
Member

Are there any error messages in your ~/.wakatime/wakatime.log file?

@MarkLester10
Copy link
Author

Are there any error messages in your ~/.wakatime/wakatime.log file?

Where can i find this file?

@MarkLester10 MarkLester10 reopened this Apr 25, 2023
@MarkLester10
Copy link
Author

Here is the error from wakatime.log file

{"caller":"cmd/offline/offline.go:63","func":"offline.loadParams","level":"warning","message":"failed to load API parameters: api key not found or empty","now":"2023-04-25T22:01:35+08:00","os/arch":"darwin/arm64","version":"v1.73.0"}
{"caller":"cmd/run.go:301","file":"/Users/marklestermorta/.wakatime/wakatime-internal.cfg","func":"cmd.runCmd","level":"error","lineno":1,"message":"failed to run command: sending heartbeat(s) failed: invalid api key... find yours at wakatime.com/api-key. api key not found or empty","now":"2023-04-25T22:01:35+08:00","os/arch":"darwin/arm64","time":1682431295.319011,"version":"v1.73.0"}

@Mwansasquared
Copy link

I noticed that the issue resulted from the Wakatime API Key being unable to be updated even after generating a new key.
I had to uninstall the extension, reload VS Code, then reinstall the extension, and paste the newly generated key, that fixed it for me.

@alanhamlett
Copy link
Member

Fixed in v24.2.0 by prompting to enter your api key when the it's invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants