-
Notifications
You must be signed in to change notification settings - Fork 72
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
Google Calendar Token problem #96
Comments
I have a post here with screenshots, check that this matches up with what you are doing: #19 (comment) You should see a credentials.json and also a token.pickle on disk. Have a peek inside them with The idea behind the refresh token is that you don't have to keep redoing the instructions, it refreshes itself (and works fine normally, so 'something is happening to cause your refreshes to not happen 🫤) |
That is exactly what i followed. i could not use the "TV" token as it repored an error, when
and if i take the URL and paste it in to the browser i get: so i could not proceed. the desktop token, however, worked, if only for seven days. it is just that the token has expired. perhpas there is some setting at the application level that makes a difference? at, say, "OAuth consent screen"? what scopes does the app need? if the are restricted/sensitive then test app needs verification and before that all tokens will only live for a week:
Basically, as i understand it, Google say that their non-prod tokens and refresh-tokens only last for a week and that after that we need to recreate them. Isn't this a problem everyone else is seeing? |
For what it's worth, I'm using a Desktop OAuth credential and haven't had to redo it in years. However my app is "in production". I think you may need to do that -- and possibly allow just your own Google user to access it? |
That is what i thought but it felt like an overkill so I thought i would ask. Thank you! |
I went and had a look what i need to do to make the "app" be in production. I need to provide app logo, app home page, link to privacy documents which are publically available, link to pub available terms of service, i need to register the domain those docs are on... and that is just the first screen. i tried not answering but it would not let me proceed until i have everything in place. Is it really supposed to be this difficult? or did i select some other setting that made it this difficult? can someone remember how they registered the app? i am guessing anyone new will have the same problem... |
To add to all this faffing about, I've noticed that my entire OAuth Consent Screen layout has completely changed to the 'new experience', a different layout, same information but multiple pages. In any case I still don't have those fields as mandatory. I'm wondering why it's the case for you. Do you have other secrets that are generated for non-desktop application, something like that? Could you go to Google Console top right at the top and generate a brand new project and start over? It might be that something has flagged this particular oauth as more verification required, but if you start in a new project maybe it's fresh and you can generate just one credential file. |
Good suggestion. I just created a brand new project and went through the steps once again. out of interest, what scope should be selected? i selected interestingly, now when i go and look at the scopes nothing appears to be selected but the display works with the new credentials. This is really bad from google as i cannot see the scope i selected even though i know that i selected it (since i took a screenshot). let's see if it works first and then if i will be able to make it "production". given that no scopes are listed i am guessing that i will be able to make it prod withouth verification. i'll check in the morning... |
I wonder if the presence of the scopes 'triggers' a more strict check. |
creating a completely new project and then doing everything from scratch appears to have worked. desktop token was ok, tv one was not. i chose i think the reason it didn't work before was the scope choice but i cannot find a way of seeing what scope i chose last time. it just doesn't appear on any of the screens on the portal. may be worth exctending the documentation to include portal side too or perhaps it was just me 😆 thank you all for all the suggestions and help |
i think the choice matters however i had to provide a scope or google would not let me create the token. when look now, i can no longer see what scope i chose. My scope screen now looks exactly like yours - blank. |
Alright that was an adventure and a half ha. I've also added 'create a new project' to the comments. Honestly it feels more and more difficult working with GCP, just to read some calendar entries. Contrast this with Outlook's which has been seamless and works really well. |
I recently (14 days ago) built the display and connected it to google calendar following the procedure in the instructions. After seven days the calendar stopped updating and i got the following error:
google.auth.exceptions.RefreshError: ('invalid_grant: Token has been expired or revoked.', {'error': 'invalid_grant', 'error_description': 'Token has been expired or revoked.'})
I thought that perhaps i did something wrong so i deleted the token and followed the instructions again to create a new one. That also worked for seven days (actually seven days and 15 minutes looking at the token creation time and the last update on the screen) and now i am again getting the same error:
Any ideas how to stop this from happening? I looked on google portal but i cannot see where that i can change the lifespan for tokens etc but then i shouldn't have to, that is what refresh tokens are for, right? The token is a Desktop token and looking at the portal i cannot see anything that tells me if it had expired or not.
Googling suggests that this is to do with the "app" being in "testing" and to fix this one would need to make it production. This sounds like a total overkill as i would be the only one using it and having google verify the app is nonsensical. How did other solve this problem?
Any pointers will be most welcome.
The text was updated successfully, but these errors were encountered: