When I try to call the Google Calendar in PHP it gives me

Fatal error: Uncaught exception 'apiServiceException' with message 'Error calling POST https://www.googleapis.com/calendar/v3/calendars/primary/events?key=ABQIAAAAsxHZhPGSukLbZlUcR7gZFhTVSiE46oDPbAIEWnLSRISr9hykzRT26WAMhnP0hQe-Tk5dj5M8wQHwFQ: (401) Invalid Credentials

I looked at my developper key and it is the same. Is it suppose to be the developper key or something else?

My initial reaction is that you haven't authorized your application to use data either via OAuth or some other Google approved method. In the calendar API, the primary calendar is scoped to the authorized user your currently working with.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.