Integrations - Google Calendar
Description
Users with a google social identity are able to sync their bookings with their google calendar.
Parameters
- Authorization: Bearer token for authentication.
- Auth0-IdToken: Auth0 ID token for authentication.
- auth0_id:
Path
parameter containing theauth0_id
of the google account to be linked/unlinked.Endpoints
POST /api/me/identities/{auth0_id}/google_calendar
Description
Sets the identity as main google calendar identity, then creates a new calendar and syncronizes bookings with status [:reserved, :ongoing :completed]
into Google Calendar.
Example Request
curl \
-X 'POST' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
'https://<API_HOST>/api/me/identities/<AUTH0_ID>/google_calendar'
Example Response
{
"data": {
"id": "<ID>",
"type": "user_identity",
"attributes": {
"auth0_id": "<AUTH0_ID>",
"provider": "google-oauth2",
"email": "<EMAIL>",
"social": true,
"id": "<ID>",
"email_verified": true
},
"meta": {
"google_calendar_enabled": true
}
}
}
DELETE /api/me/identities/{auth0_id}/google_calendar
Description
Removes all Google Calendar event ids from bookings and deletes the calendar from google.
Parameters
Example Request
curl \
-X 'DELETE' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
'https://<API_HOST>/api/me/google_calendar'
Example Response
{
"data": {
"id": "<ID>",
"type": "user_identity",
"attributes": {
"auth0_id": "<AUTH0_ID>",
"provider": "google-oauth2",
"email": "<EMAIL>",
"social": true,
"id": "<ID>",
"email_verified": true
},
"meta": {
"google_calendar_enabled": false
}
}
}
Last modified: 22 days ago