Google-api-php-client: Adding guests to created event, trigerrs invalid email address for correct email address

Created on 25 Mar 2019  路  2Comments  路  Source: googleapis/google-api-php-client

exception 'Google_Service_Exception' with message '{
"error": {
 "errors": [
  {
   "domain": "global",
   "reason": "invalid",
   "message": "Invalid attendee email."
  }
 ],
 "code": 400,
 "message": "Invalid attendee email."
}
}
question

Most helpful comment

`client);

$event = $service->events->get($this->calendar_id, $event_id);

$event->setAttendees(array(array('email' => $this->email)));

$updatedEvent = $service->events->update($this->calendar_id, $event->getId(), $event, $this->event_update_param); ?>`

email is having leading and trailing spaces lead to invalid email

All 2 comments

Hi @jayanthanantharapu, please share the code snippet which raised the error.

`client);

$event = $service->events->get($this->calendar_id, $event_id);

$event->setAttendees(array(array('email' => $this->email)));

$updatedEvent = $service->events->update($this->calendar_id, $event->getId(), $event, $this->event_update_param); ?>`

email is having leading and trailing spaces lead to invalid email

Was this page helpful?
0 / 5 - 0 ratings