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

Invalid token #16

Open
Tienam123 opened this issue Dec 14, 2024 · 12 comments
Open

Invalid token #16

Tienam123 opened this issue Dec 14, 2024 · 12 comments

Comments

@Tienam123
Copy link

When I try to insert code from the site into the plugin, phpstorm gives an error
codetime

@Jannchie
Copy link
Owner

Hi, thanks for using Code Time. I noticed you downloaded an older version of the plugin that has been deprecated. You can find the new version of the plugin here: https://plugins.jetbrains.com/plugin/25617-codetime

@Tienam123
Copy link
Author

Screenshot from 2024-12-14 18-00-01

with the new plugin the situation is similar for jetbrains b vscode

@Jannchie
Copy link
Owner

Strange. May I ask if you are using https://codetime.dev? Because there might be other services with the same name…

@Tienam123
Copy link
Author

Tienam123 commented Dec 14, 2024

yes , and refresh token don't accept that couple of days i have that problem

Screenshot from 2024-12-14 18-55-18

@Jannchie
Copy link
Owner

I apologize for any inconvenience caused.

However, I haven’t been able to pinpoint where the issue might be...

I may need you to provide more information. Could you please try using the command below to check the output? If everything is working correctly, you should receive a JSON response.

curl -H "token: <your-token-here>" "https://api.codetime.dev/user/minutes?minutes="

@Tienam123
Copy link
Author

Screenshot from 2024-12-14 21-17-17

it tells me there is no such user) although before copying I updated the token in the personal account

@Tienam123
Copy link
Author

Tienam123 commented Dec 14, 2024

and next request with new updated token response with user not found.

I solved the problem after I went to https://api.codetime.dev/user in the browser and copied the token from the object by the key "upload_token" then threw it into the IDE and it worked for me. But when I copy from the form in the account, it causes an error invalid token

@Jannchie
Copy link
Owner

I see. This might be a frontend issue, possibly related to the browser or operating system. I noticed that you seem to be using Linux, though I’m not sure which distribution it is. I’ll try to fix this issue.

@Tienam123
Copy link
Author

Yes I use ubuntu 24.04 but I had the same problem when I tried to do it on windows from my laptop

@Jannchie
Copy link
Owner

May I ask what the difference is between the token content copied to the clipboard from the webpage and the response payload?

@Tienam123
Copy link
Author

I checked both of these tokens and they turned out to be absolutely identical, but I decided to test again and first I pasted the code copied from the front end into vs code and the error repeated itself, then I repeated the operation again and copied it from the API and everything worked.
This is screen from VS Code when i paste front-end token
Screenshot from 2024-12-16 07-15-06

Then i ckecked both of them in js and see both identical
Screenshot from 2024-12-16 07-22-21

Maybe this can help you

@siaikin
Copy link

siaikin commented Jan 1, 2025

@Jannchie Hi 我注意到webstorm插件市场里有两个名为 codetime 的插件,https://plugins.jetbrains.com/plugin/15507-codetimehttps://plugins.jetbrains.com/plugin/25617-codetime。在此之前我一直使用前者,直到我遇见 “Invalid token”。

如果前者已弃用,请在网站中提示。

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