I've found this question numerous times, but I can't find a single instance of a solution, so I'm trying myself.

I'm creating a simple web application to help my employer schedule events to a Google Calendar. I've created the calendar, registered it with the Google API and have written cURL functions to check for existing appointments and return times & dates. I'm hung up on the function to create new events. The function I've written (with some variable names expanded for clarity) follows:

The cURL function is almost identical to the functions I have in place to read events & return existing values - both of which work fine! I use the same $authtoken variable, collected via a refresh token with the "https://www.googleapis.com/auth/calendar" scope explicitly defined. I have read and re-read the Google OAuth documentation but can't seem to find exactly where this error is coming from.

$apptInfo is an array, encoded to JSON, with the appointment information and includes a start & end time, summary and description.

I know this can be done more easily with the PHP library provided by Google, or with the Zend/GData framework. However, I am using this project as a way to teach myself PHP - I have very little experience with it prior to now - and would like to at least understand where the Login error is coming from, and how I might overcome it, before falling back on existing shortcuts. I have the luxury of time on my side since this is not a necessary project; it's just something I'm trying to help out with.

Can anyone explain to me what I'm doing wrong, or what further information I'd need to share to isolate the issue? I'd hate to miss this as a learning opportunity!

WOW zombie question! :) Answer accepted @Eddwinpaz - thanks for your time. I was able to solve this on my own with a little more research. FYI - the PHP API given by Google is incompatible with my app since I need it to log in "automagically" - my users aren't technologically competent enough to deal with UN/PW dialogs on their phones.
–
AlexFeb 22 '14 at 17:07