- Products
- Solutions Use casesBy industry
- Developers
- Resources Connect
- Pricing
If you’re looking to integrate Exchange calendars directly into your app, this post will detail the major aspects of the Exchange Calendar API and explain what it takes to integrate Exchange calendars smoothly. It will also demonstrate how the Nylas Platform abstracts away much of the complexity of building a direct integration with the Exchange calendar API to enable you to build your calendar integration much more quickly and efficiently.
Contents:
$ curl -X GET 'https://api.nylas.com/calendars' -H 'Authorization: Bearer ACCESS_TOKEN' [ { "id": "9a09r24v269qsijwl27nxv4t2", "account_id": "aaffnt*****", "name": "Calendar", "description": null, "read_only": false, "object": "calendar" }, { "id": "5voxh7b7bg9fchti99lsrei5j", "account_id": "aaffnt*****", "name": "Emailed events", "description": "Emailed events", "read_only": true, "object": "calendar" }, { "id": "9a09r24v269qsijwl27nxv4t2", "account_id": "aaffnt*****", "name": "Agricultural Conferences", "description": "Agriculture Industry Events", "read_only": true, "object": "calendar" } ]
$ curl -X GET 'https://api.nylas.com/events/{id}' -H 'Authorization: Bearer ACCESS_TOKEN' [ { "account_id": "bh1vu31mw9a***", "busy": true, "calendar_id": "h4rm1jjibrzd7***", "title": "Monthly Top Soil Sustainability Meetup", "description": "This is our normal monthly meetup to discuss progress being made on the topsoil sustainability.", "ical_uid": "040000008200B00073D5B71D31B3F9D2612722", "id": "c7n5vfdagsd7bdeq***", "location": "Alabama", "message_id": null, "object": "event", "owner": " Henry Ford <[email protected]>", "participants": [ { "comment": "So many exciting things are happening in my cotton field!", "email": "[email protected]", "name": "George Washington Carver", "status": "yes" }, { "comment": "Apologies, but I have more pressing matters this month", "email": "[email protected]", "name": "Albert Einstein", "status": "no" } ], "read_only": true, "status": "confirmed", "when": { "end_time": 1478568600, "object": "timespan", "start_time": 1478565000 } } ]
$ curl -X POST "https://api.nylas.com/calendars/free-busy" -H 'Authorization: Bearer ACCESS_TOKEN' \ -d "{ \"start_time\":\"1409594400\", \"end_time\":\"1409598000\", \"emails\": [\"[email protected]\"] } " [ { "object": "free_busy", "email": "[email protected]", "time_slots": [ { "object": "time_slot", "status": "busy", "start_time": 1409594400, "end_time": 1409598000 }, { "object": "time_slot", "status": "busy", "start_time": 1409598000, "end_time": 1409599000 } ] } ]
$ curl -X GET 'https://api.nylas.com/events?expand_recurring=true' -H 'Authorization: Bearer ACCESS_TOKEN' [ { 'id': '5soti3r111c0f35dllc0iz2zb_20200317T170000Z', 'title': 'Weekly Machinery Sync', 'description': 'This is our weekly meeting to stay in sync on upcoming farming equipment!', 'when': { 'start_time': 1584464400, 'end_time': 1584465900, 'object': 'timespan' }, "participants": [ { "comment": null, "email": "[email protected]", "name": "George Washington Carver", "status": "yes" }, { "comment": null, "email": "[email protected]", "name": "Henry Ford", "status": "yes" } ], ], 'calendar_id': '5idi2a6***', 'status': 'confirmed', 'master_event_id': '5soti3r111c0f35dllc0iz2zb', 'owner': ' [email protected]', ... }, { 'id': '8dg2y9scccgacw519fd5iz89h_20200317T170000Z', 'when': { 'start_time': 1584550800, 'end_time': 1584552600, 'object': 'timespan' }, "participants": [ { "comment": null, "email": "[email protected]", "name": "George Washington Carver", "status": "yes" }, { "comment": null, "email": "[email protected]", "name": "Henry Ford", "status": "yes" } ], ], 'calendar_id': '5idi2a6***', 'status': 'confirmed', 'master_event_id': '5soti3r111c0f35dllc0iz2zb', 'owner': '[email protected]', ... }, { 'id': 'bjds9az3wmaizmd5eaq5q33lr_20200317T170000Z', 'when': { 'start_time': 1584637200, 'end_time': 1584639000, 'object': 'timespan' }, "participants": [ { "comment": null, "email": "[email protected]", "name": "George Washington Carver", "status": "yes" }, { "comment": null, "email": "[email protected]", "name": "Henry Ford", "status": "yes" } ], ], 'calendar_id': '5idi2a6***', 'status': 'confirmed', 'master_event_id': '5soti3r111c0f35dllc0iz2zb', 'owner': ' [email protected]', ... } ]
from nylas import APIClient nylas = APIClient( CLIENT_ID, CLIENT_SECRET, ACCESS_TOKEN ) # Return all of the events a user has across all of their calendars all_events = nylas.events.all() # Return events only for a specific calendar my_calendar_events = nylas.events.where(calendar_id='{id}')
from nylas import APIClient nylas = APIClient( CLIENT_ID, CLIENT_SECRET, ACCESS_TOKEN ) event = nylas.events.create() event.title = "Learn about our new filament improvements" event.description = "Let's talk about the recent changes to our filament technology" event.busy = True # Provide the appropriate id for a calendar to add the event to a specific calendar event.calendar_id='{id}' # Participants are added as a list of dictionary objects # email is required, name is optional event.participants = [ { "name": "Thomas Alva Edison", 'email': '[email protected]' }, { "name": "Susan Seller", 'email': 'susan@your_company.com' } ] event.when = {"start_time": 1577829600, "end_time": 1577840400} # notify_participants='true' will send a notification email to # all email addresses specified in the participant subobject event.save(notify_participants='true')
Ben is the Developer Advocate for Nylas. He is a triathlete, musician, avid gamer, and loves to seek out the best breakfast tacos in Austin, Texas.