Google Drive Integration in CRM Stops Working: Expired or Revoked Token
After months of operation, the integration of the Disk does not download or save files, although before everything worked.
Why is this happening?
Refreshing the token may not work, the user may have revoked the consent, the OAuth client may have changed the configuration or the token has been cancelled.
Step by step solution
1. Read the exact API response and distinguish 401, 403, invalid grant and no access to a specific folder.
2 . Check OAuth client configuration and consent ranges without revealing client secret.
3 . Determine whether the refresh token exists on the server side and whether the renewal mechanism works.
4 . When the permission is revoked, reauthorize the account and verify the owner of the resource.
5 . Add a visible integration alert and a safe queue of reruns instead of silently omitting files.
How do I check the score?
The test document goes to the correct folder and can be opened from a valid CRM account.
Do not store OAuth tokens in frontend code or public NEXT PUBLIC variables.