This topic was automatically generated from Slack. You can find the original thread here.
Every few days I get this error in my workflow:
errorError: Invalid Credentials
at Gaxios._request (/var/task/node_modules/gaxios/src/gaxios.ts:169:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async OAuth2Client.requestAsync (/var/task/node_modules/google-auth-library/build/src/auth/oauth2client.js:382:18)
at async Object.listMessages (file:///var/task/user/gmail/gmail.app.mjs:243:24)
at async Object.run (file:///var/task/user/gmail_custom_oauth/sources/common/polling.mjs:64:22)
at async /var/task/index.js:122:11
at async captureObservations (/var/task/node_modules/@lambda-v2/component-runtime/src/captureObservations.js:28:5)
at async exports.main [as handler] (/var/task/index.js:60:20)
I’m sorry to hear that you’re experiencing issues with your workflow. The error message you provided indicates that there’s an issue with the credentials being used for the Gmail API. To resolve this issue, please try the following steps: 1. Open the workflow in the Pipedream UI. 2. Find the step that uses the Gmail API and click on the connected account (Gmail or Gmail Custom OAuth) to edit the connection. 3. Re-authenticate the account to refresh the access token. If the issue persists, you may want to double-check your API credentials and ensure they are still valid. If you continue to experience issues, please visit https://pipedream.com/support for more support options.
I understand that re-authenticating can be a temporary solution, and you’re looking for a more permanent fix. One possible reason for the “Invalid Credentials” error could be the expiration of the access token. In some cases, the refresh token process might not be working as expected, causing the issue to reoccur. To help you find a more permanent solution, I would recommend checking the following: 1. Ensure that your Gmail API credentials (Client ID and Client Secret) are set up correctly and have the necessary permissions. 2. Make sure that your workflow is handling token refreshes properly. You can refer to Google’s OAuth 2.0 documentation for handling token refreshes: Using OAuth 2.0 to Access Google APIs | Authorization | Google for Developers If you continue to face issues, please visit https://pipedream.com/support for more support options.