I have successfully used the Gmail API with Google Cloud Console and OAuth Playground to send emails. It worked for a few days, but after a while, my authentication gets revoked. Even though I make sure to re-enter my OAuth credentials, I still encounter the issue.
Goal: I am trying to create a contact page on my website that allows users to send emails to my inbox using the Gmail API.
Can anyone help me understand why my OAuth tokens are being revoked and how to make sure the email-sending functionality works consistently?
I have successfully used the Gmail API with Google Cloud Console and OAuth Playground to send emails. It worked for a few days, but after a while, my authentication gets revoked. Even though I make sure to re-enter my OAuth credentials, I still encounter the issue.
Goal: I am trying to create a contact page on my website that allows users to send emails to my inbox using the Gmail API.
Can anyone help me understand why my OAuth tokens are being revoked and how to make sure the email-sending functionality works consistently?
Based on the description you have provided, my best answer is that if your Outh Client ID and API key are still available in Cloud Dashboard(which you can check here: https://console.cloud.google.com/apis/api/gmail.googleapis.com/credentials?authuser=2&inv=1&invt=AboUDA&project=inboxiq-432403), I assume you may have gone over the allotted API credits.
It is also standard for OAuth Playground to delete access tokens after 3589 seconds, so that could be it.
Apologies I couldn't be more helpful.