Google Calendar Api bad request 400 event over developer console

google calendar api invalid credentials
google calendar error 400
google calendar api 403 forbidden
code'': 401, message'': invalid credentials
google calendar api sample code
google calendar api service account
google api error codes
the specified time range is empty

I've created project and registered it using https://code.google.com/apis/console (I've choosen "other" application type). Then I got "Client ID" for installed applications.

Then I went to console and created event, and authorised using oauth 2. https://developers.google.com/google-apps/calendar/v3/reference/events/insert Everything worked fine.

    POST https://www.googleapis.com/calendar/v3/calendars/primary/events?key={YOUR_API_KEY}

Content-Type:  application/json
Authorization:  xxx
X-JavaScript-User-Agent:  Google APIs Explorer

{
 "end": {
  "dateTime": "2013-1-16T10:00:00.000-07:00"
 },
 "start": {
  "dateTime": "2013-1-16T10:00:00.000-07:00"
 }
}

Response

200 OK

- Show headers -

{

 "kind": "calendar#event",
 "etag": "\"WANTVF5ixxZ04U_VtQ0AZ3MbAlM/Z2NhbDAwMDAxMzY1NjU0MzAwNTk1MDAw\"",
 "id": "2nsuis19mkp2q0uef54tl5nk68",
 "status": "confirmed",
 "htmlLink": "https://www.google.com/calendar/event?eid=Mm5zdWlzMTlta3AycTB1ZWY1NHRsNW5rNjggaXZhbjEzMzEzM0Bt",
 "created": "2013-04-11T04:25:00.000Z",
 "updated": "2013-04-11T04:25:00.595Z",
 "creator": {
  "email": "ivan133133@gmail.com",
  "displayName": "ivan rozhcov",
  "self": true
 },
 "organizer": {
  "email": "ivan133133@gmail.com",
  "self": true
 },
 "start": {
  "dateTime": "2013-01-16T21:00:00+04:00"
 },
 "end": {
  "dateTime": "2013-01-16T21:00:00+04:00"
 },
 "iCalUID": "2nsuis19mkp2q0uef54tl5nk68@google.com",
 "sequence": 0,
 "reminders": {
  "useDefault": true
 }
}

Then I copied id and updated this event. https://developers.google.com/google-apps/calendar/v3/reference/events/update update First time I got 200 response.

PUT https://www.googleapis.com/calendar/v3/calendars/primary/events/2nsuis19mkp2q0uef54tl5nk68?key={YOUR_API_KEY}

Content-Type:  application/json
Authorization:  Bearer ya29.AHES6ZRmo6pdxj8pY4NmzdI1estRNB-v87XV7xQHgyhrWHk2rzs3Ke8
X-JavaScript-User-Agent:  Google APIs Explorer

{
 "end": {
  "dateTime": "2013-1-16T10:00:00.000-07:00"
 },
 "start": {
  "dateTime": "2013-1-16T10:00:00.000-07:00"
 }
}

But when I tried this again, I always got 400 error, error text is written below.

https://developers.google.com/google-apps/calendar/v3/reference/events/update update

400 Bad Request

cache-control:  private, max-age=0
content-encoding:  gzip
content-length:  123
content-type:  application/json; charset=UTF-8
date:  Wed, 10 Apr 2013 12:49:29 GMT
expires:  Wed, 10 Apr 2013 12:49:29 GMT
server:  GSE

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value"
   }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}

Can anyone explain, if that's google.api bug, or maybe I'm mistaken somwhere?

I've tryed it from differret account and PC (throught Google APIs Explorer and python library with same result)

Today I've tried to reproduce that bug. But everring works fine now. I've created an issue in google code http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3371&thanks=3371&ts=1365599378 Still without answer.

I think it's was temporaru bug.

400 almost always means a simple syntax error in your auth URL. The most common cause is that you’ve either failed to URL-escape your scope or redirect, or alternatively URL-escaped it more than once.

Handle API Errors | Calendar API, The Calendar API returns two levels of error information: 400: Bad Request Suggested action: Follow the advice on Google Calendar API Usage Limits. Raise the per-user quota in the Developer Console project. This error can also occur if a request attempts to delete an event that has already� 400: Bad Request User error. This can mean that a required field or parameter has not been provided, the value supplied is invalid, or the combination of provided fields is invalid.

Check this: Google Calendar API - can only update event once and this: Google Calendar api v3 re-update issue

Sequence number needs to be increased when you change date/time of event, that is the reason why you are getting 400 - Bad request.

This is how I solved it using java client library.

mGoogleCalendarEvent contains updated information about event. First, get sequence number of this event from GoogleCalendar:

mGoogleCalendarEvent.setSequence(mService.events().get(mCalendarId,mGoogleCalendarEvent.getId()).execute().getSequence());

And then perform update:

mService.events().update(mCalendarId, mGoogleCalendarEvent.getId(),mGoogleCalendarEvent).execute();

Google calendar API 400 error, I'm trying to execute a simple freebusy query on the Google Calendar API. Google Calendar Api bad request 400 event over developer console , 13 May 2019� key identifies your application to google using the api key you create in google developer console. Private data is data that is owned by a user for instance your google calendar an application can not post to it with out permissions. Inorder to do this we use Oauth2. You create a client on google developer console then login the user using oauth2.

I used patch instead of update and it works fine by now. But don't realy understand why update succeded first time and failed second and other times. Total mystery.

Package google.rpc | App Engine Admin API, Join events and learn more about Google Cloud A message type used to describe a single bad request field. HTTP Mapping: 400 Bad Request "sql table", "cloud storage bucket", "file", "Google calendar"; or the type URL of project may require the writer permission on the developer console project. Used the correct OAuth 2.0 client ID and the correct API key, even regenerated the API key to see if a new one would work. It didn't. Actual Behavior. Printed this response upon running localhost. Google Calendar API Quickstart

Discovered the exact same problem when accessing the Google Calendar API with the Google APIs Client Library for Javascript. It happens if I try to update the start date of a calendar event. Updating the end data is no problem. Really weird.

Fortunately, I was able to fix the issue by replacing update with patch too.

HTTP status and error codes for JSON | Cloud Storage, Example values include: 400 (Bad Request), 401 (Unauthorized), and 404 (Not Found). badRequest, The request cannot be completed based on your current Cloud developer key provided, access to Cloud Storage JSON API is not enabled. Events � Podcast � Community � Press center � Google Cloud on YouTube� Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question.Provide details and share your research! But avoid …. Asking for help, clarification, or responding to other answers.

How to Use the Google Calendar API, The Google Calendar API lets you add and update events If you are a developer with control over your environment (and Here's an example of using Google Calendar's native HTTP API in Python using the popular requests library, the data you need, and tools to add Python or Javascript code to your� Imports an event. This operation is used to add a private copy of an existing event to a calendar. insert Creates an event. instances Returns instances of the specified recurring event. list Returns events on the specified calendar. move Moves an event to another calendar, i.e. changes an event's organizer. patch Updates an event.

Calendar stops working with Google-Calendar after WP-Update , My Calendar don't syncronize with my public Google Calendar anymore. (400) Bad Request If i click on navi-arrow for backwards and again on the forward- arrow, i get February with all Events! "extendedHelp": "https://console. developers.google.com/apis/credentials?project=605371090598" } ], "code": 403, � You can use the Google Calendar API to find and view public calendar events. If you're authorized, you can also access and modify private calendars and events on those calendars. Use the Google Calendar API to achieve deeper integration with Google Calendar. Mobile apps, Web apps, and other systems can create, display, or sync with Calendar data.

Google Calendar API / App Inventor 2 Tutorial, How to view and INSERT calendar events using App Inventor 2 (with no web service scripts). app to use google api here https://console.developers.google. com/project jump on the internet, go to your google calendar, and you will see the event Hmm 400 means bad request - something is not right in the request url. Now that you can look up existing calendars, you could also create new events in that calendar through Google Calendar's API. The easiest way to create a new event with the Google Calendar API is by sending a POST request to the quickAdd endpoint with a text=Tuesday+meet+Bob! body – this includes intelligent parsing of times for simple

Comments
  • I use Google APIs Explorer, thus I can't control URL-escaping.