Authorization Code must be renewed every few days

  • Platform information:
    • Hardware: Raspberry Pi 4 Model B Rev 1.2
    • OS: Linux 5.10.17-v7l+
    • Java Runtime Environment: where can i find that?
    • openHAB version: 3.0.1-2

Hello.
I have installed Google Cloud Text-to-Speech. The output works fine.
But after a few days I get an auth error in the log when I use the ‘say’ command.
Then I have to generate a new auth-code via the given link with my client ID. After entering it, it works again immediately.
What is the reason for this? How can I save/use the authorization code permanently?

[ERROR] [oauth2client.internal.OAuthConnector] - grant type refresh_token to URL https://accounts.google.com/o/oauth2/token failed with error code invalid_grant, description Token has been expired or revoked.

[WARN ] [ce.googletts.internal.GoogleCloudAPI] - Error initializing Google Cloud TTS service: Error fetching access token. Invalid authcode? Please generate a new one.

I have not been able to find anything about a validity period.
Thanks in advance.

1 Like

I have the same issue, but ignored it for now since I repeat the same announcements all the time and then it uses the cached wave instead …

1 Like

What may help is if you update “APIs & Services → OAuth consent screen” in your Google Cloud Platform Console and configure:

  • Publishing Status to Production
  • User Type to External

See also: Google Nest Device Access Console now available - #229 by dschoepel

3 Likes

Thank you this looks promising

1 Like

Thank you.
I have switched to Production. The user type was already External.
I have to wait 2 weeks, then i will see it and report back

1 Like

Please keep us updated with the results! :slight_smile:

If it helps, it would be a good idea to also add this to the add-on documentation. :books:

2 Likes