-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Token expire after 7 days #56
Comments
I have the same problem and API for the refresh token doesn't work |
Yeah I have the same problem. Not sure how long it's lasting exactly but the refresh_access_token function is not working. |
@muhammadmubeen12345 @damasofc @pakhilov Did any of you find a solution / workaround in the end? |
@LordA98 I have not found any solution about update of token automatically. Every Monday I update the token manually... |
Hey @LordA98 and @muhammadmubeen12345 have you both tried "refresh_access_token"? I just added to my cypress project easily with this file: refreshGmailToken.ts. I then call this script on each CI run uploading the new token to S3 here: github workflow! This will be downloaded by the following runs! I hope I was able to help you and if you need more help just let me know! |
Yes, even after using the refresh_access_token function, the 'invalid_grant' error will eventually show up. |
@the-bmc-dev can it be because you are scanning the inbox too frequently of using broad filters? |
@levz0r I did not think about that, are there such restrictions on Gmail API? |
Hi, and I call it like this in my test: I am getting this error:
Any idea where do I make mistake? |
Thanks for the code example. I too would love to hear how others are using it, otherwise without a fully working refresh token they expire every two days so the whole plugin becomes not very useful. |
Hi, |
@omersomuncu Check this issue. The key |
@levz0r could you please help to resolve this issue? |
would be nice to have this done automatically |
Hi @omersomuncu im trying to solution i don't have a CI/CD pipeline. I am just executing the test from terminal. How can i automatically refresh the token? |
@mariamaslam there is nothing to do with a code. To have a stable token you need to change the Publishing status of your Google app from "In testing" to "In production". You can do it here - https://console.cloud.google.com/apis/credentials/consent |
Hi @taninnazar thank you quick response, so once changed to "in production" the token will not expire right? |
Hi @mariamaslam , the token will expire but more rarely - like once a year or once a half year |
Amazinggg @taninnazar do i just need to change the permission n that would be it or do i need to re- generate the token with gmail-tester? |
aany solution @mariamaslam |
How to automatically update the token in gmail API.
The text was updated successfully, but these errors were encountered: