Answer the question
In order to leave comments, you need to log in
Google Calendar API working through Backend?
Guys tell me if there is a workaround.
My task is simple, I need to create events in the Google calendar through the backend.
But Google writes that you can only communicate with its API via OAuth2: https://developers.google.com/calendar/api/guides/auth
And I need to do this from the php backend, maybe you know how to do it? Api key and service account I tried they don't fit that's for sure.
He writes something like this:
{
"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.",
"errors": [
{
"message": "Login Required.",
"domain": "global",
"reason": "required",
"location": "Authorization",
"locationType": "header"
}
],
"status": "UNAUTHENTICATED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "CREDENTIALS_MISSING",
"domain": "googleapis.com",
"metadata": {
"service": "calendar-json.googleapis.com",
"method": "calendar.v3.Events.Insert"
}
}
]
}
}
{
"error": "unauthorized_client",
"error_description": "Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested."
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question