Google Calendar Sync
Contents
Mobile_API »Google Calendar Sync
Base URL
https://apimobile.callproof.com
Endpoint
/api/calendar/google-sync/
Purpose
Connects the authenticated user’s account to Google Calendar using an OAuth authorization code. Stores the Google tokens for the given device type, clears any previously selected Google calendar follow-up selection, and optionally uploads a user profile image when one is not already set.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
| Content-Type | Conditional | Use multipart/form-data when uploading user_profile_image
|
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| device_type | string | Yes | Device platform used for Google OAuth client credentials. Supported values: ios, android
|
| auth_code | string | Yes | Google OAuth authorization code used to generate access tokens |
| user_profile_image | file | No | Optional profile image to upload only when the user does not already have a profile image |
Successful Response (200)
Indicates that Google Calendar was synced successfully.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| message | string | Confirmation message (for example, "Google Calendar Synced Succesfully") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 401 with the first validation error message
|
| 400 | Bad Request – Google Calendar could not be synced |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Missing
device_typeorauth_code. - 400 – Invalid device type ("Invalid DeviceType"), invalid/expired Google token ("Invalid Token"), or sync failure (for example, "Error while syncing the Google Calendar").
- 401 – Authentication failed or the access token is missing/expired.