Hello, I am trying to set up a flow from Facebook lead form to Gmail. However, under the Response Received for the Gmail, it mentioned Error 401 with the following message:
Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See
https://developers.google.com/identity/sign-in/web/devconsole-project.
This error message indicates that the authentication credentials used for the Gmail API request are not valid or missing. The Gmail API requires that you authenticate with valid OAuth 2.0 credentials to access user data.
Here are a few things you can check to resolve this error:
- Make sure you have created a project in the Google Developers Console and have enabled the Gmail API for that project.
- Ensure that you have created valid OAuth 2.0 credentials for your project, such as a client ID and secret.
- Check that the OAuth 2.0 access token you are using is still valid and has not expired. You may need to generate a new access token.
- Verify that you are using the correct authorization scope when requesting access to user data.
- Ensure that the access token is being included in the request header as "Authorization: Bearer {access_token}".
- If you are still having trouble, refer to the Gmail API documentation and the Google Developers Console documentation for more information on how to authenticate your requests.