Google Search Console integration breaks after 7 days due to expiring OAuth tokens #202
Open
2 tasks done
Labels
documentation
Improvements or additions to documentation
Past Issues Searched
Issue is a Bug Report
Using official Plausible Cloud hosting or self-hosting?
Self-hosting
Describe the bug
Via plausible/analytics#690, only that the number of websites set up is not a factor.
The instructions to integrate Google Search Console with Plausible (https://github.com/plausible/community-edition/wiki/google-integration) use an external user type and a publishing status of "Testing" in Google Cloud Platform.
However, it seems that GCP rotates the OAuth token every 7 days in this constellation:
Thanks to @mheland for finding this out.
Following these instructions gives us Google Search Console keywords for max. 7 days before the connection fails with error "invalid_grant" due to the expired token. The only remedy is to unlink the Google account and go through the setup process again from scratch, which is extremely tedious.
Perhaps it's possible to refresh the API token every n days (e.g. 6, if keeping track of the date it was added)?
Expected behavior
Once linked, the Google Search Console integration should persist and not expire for good after 7 days.
Screenshots
No response
Environment
- Plausible CE v2.1.1
The text was updated successfully, but these errors were encountered: