Closed Aymkdn closed 3 years ago
Hi, I test your patch, the result is the same:
Error: invalid_grant
invoqued by oauthClient.refreshAccessToken()
line
working around too
It might be because the project is in test and the refresh token is only valid during 7 days. I've been told to publish the project... I tried to publish it in alpha mode but the Google Console website returned an error. I wanted to try again later and see if it's enough.... So it might not be an issue with this library.
On this page, it says:
A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.
I tried to publish my project to "alpha" channel but it returns an useless error and now I'm stuck...
OK, actually I think it's from this screen: https://console.cloud.google.com/apis/credentials/consent?project=PROJECT_NAME
There is "Publication State", and it's currectly in "testing". From there you can click on the publish button.
I had the same error and after going down a rabbit hole, it looks like Google changed how OAuth worked. Your OAuth consent screen should look like this:
I then deleted my tokens.json
file (or whatever you have set in savedTokensPath
), reran the script, did the OAuth flow, and now things are running fine.
Also just to double check, you need to make sure you've got the API enabled as well: https://console.cloud.google.com/marketplace/product/google/embeddedassistant.googleapis.com?q=search&referrer=search&project=PROJECT_ID_HERE
Thanks. It should be good with my last comment.
Hi,
I configured everything and it worked great… but after a few days it stopped working and the program now returns an
invalid_grant
. I changed nothing on my side, so I'm wondering what could cause this issue?Before spending time redoing the whole registration and oauth process, I wanted to make sure it won't happen again in a few days?!
Thanks