Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7925399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:16:38+00:00 2026-06-03T18:16:38+00:00

I have my application authenticated using OAuth – and I’ve tested it with the

  • 0

I have my application authenticated using OAuth – and I’ve tested it with the calendar API. Everything works. I also used the “quick add” method for the events API, and that worked fine. But when I tried to insert using the following code

$event = new Event();
$event->setSummary('hello there');
$event->setLocation('America/Los_Angeles');
$start = new EventDateTime();
$start->setDateTime('2012-04-19');
$event->setStart($start);
$createdEvent = $cal->events->insert('myemail@gmail.com', $event);

I get the following error:

Fatal error: Uncaught exception ‘apiServiceException’ with message
‘Error calling POST
https://www.googleapis.com/calendar/v3/calendars/myemail@gmail.com/events?key=AIzaSyBddYIgnZJrXHuT8gvX-0tEypxsycw99rA:
(400) Bad Request’ in
C:\xampp\htdocs\uis\google-api-php-client\src\io\apiREST.php:86 Stack
trace: #0
C:\xampp\htdocs\uis\google-api-php-client\src\io\apiREST.php(56):
apiREST::decodeHttpResponse(Object(apiHttpRequest)) #1
C:\xampp\htdocs\uis\google-api-php-client\src\service\apiServiceResource.php(187):
apiREST::execute(Object(apiServiceRequest)) #2
C:\xampp\htdocs\uis\google-api-php-client\src\contrib\apiCalendarService.php(493):
apiServiceResource->__call(‘insert’, Array) #3
C:\xampp\htdocs\uis\google-api-php-client\examples\calendar\cal.php(44):
EventsServiceResource->insert(‘paine1591@gmail…’, Object(Event)) #4
{main} thrown in
C:\xampp\htdocs\uis\google-api-php-client\src\io\apiREST.php on line
86

with myemail@gmail.com being the ID of my calendar. It works for everything else.

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T18:16:40+00:00Added an answer on June 3, 2026 at 6:16 pm

    It appears that you’re not setting the attendees of the event.

    Example:

    $end = new EventDateTime();
    $end->setDateTime('2011-06-03T10:25:00.000-07:00');
    $event->end = $end;
    
    $attendee1 = new EventAttendee();
    $attendee1->email = 'attendeeEmail';
    
    $attendees = array($attendee1, ...);
    $event->attendees = $attendees;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php application where the user is authenticated using facebook php library
I have an api which uses OAuth 1.0a to authenticate applications using it. It's
I have application which needs to use a dll (also written by me) which
I have an application built with GWT/Appengine/Jdo...and i am using Google User Service for
I have a facebook application that was using a CFC I had found on
i have develop an application with google oAuth, this is working fine. I am
Im learning about oauth and i have my application setup and im able to
we are developing a web application using MVC3 and Jquery. we have a situation
I have an application that is using Windows Authentication and a SqlRoleProvider for user
I have a web application written in ASP .NET MVC 3. I'm using ACS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.