I’m trying to integrate with Google Calendar, but whenever I try to log in to enable the API, I receive the following message:
API Connector error: the Oauth2 API Google Calendar is not configured properly - Received error from API The service Google Calendar just returned an error (HTTP 401). Please consult their documentation to ensure your call is set up properly. Raw error:
{
“error”: {
“code”: 401,
“message”: “Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.”,
“status”: “UNAUTHENTICATED”
}
}
But there were some things in the video that weren’t obvious. I posted a comment on that video to help others:
For those who are struggling with the 401: Invalid access token issue, here are the things to understand which weren’t obvious in the video. 1. There are two separate parts to this (the video makes it look like they are the same but they are quite different) a. The first step is the user-agent flow authentication. Don’t even bother trying to set up the actual api call (i.e. userinfo endpoint). When you switch to user-agent flow in the dropdown you will see this warning: You haven’t tested this API in run mode and authenticated with LinkedIn yet… You will need complete a successful linkedin authentication with the action “Sign up/Login with a social network”. Once that is successfully complete, then you will no longer see this warning and the warning text will have changed to " This API is correctly set up as an OAuth provider. You can set up calls and use them in production." b. The second step is the userinfo endpoint. You will NOT be able to authenticate this until you have completed the first step above.Once the first step is completed, then you will no longer get the 401 error 2. You need to add in both redirect urls. This is made more obvious in Sommo’s blog post on this topic (urls are made obvious towards the end of step 2): How to implement ‘Sign In with LinkedIn’ in Bubble app
I know you’re trying to use google api here and the video is for LinkedIn but possible it might help you through it.