Z
Z
zloidennnn2018-10-05 10:53:16
API
zloidennnn, 2018-10-05 10:53:16

google calendar api?

Good afternoon! I use google calendar via api key. When calling a method

$results = $service->events->listEvents($calendarId, $optParams);

everything works, but when called, it
$service->events->insert($calendarId, $event);
gives an error
Fatal error:  Uncaught exception 'Google_Service_Exception' with message '{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "required",
    "message": "Login Required",
    "locationType": "header",
    "location": "Authorization"
   }
  ],
  "code": 401,
  "message": "Login Required"
 }
}

What could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2018-10-05
@sim3x

Login Required

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question