Google Calendar
Recall allows your users to sync their google calendar and set auto recording preferences for their meetings.
Creating Google OAuth 2.0 Client
To enable this feature, first setup an OAuth2.0 client following the steps below.
-
Obtain Google OAuth 2.0 client credentials. You can follow the steps provided here https://support.google.com/googleapi/answer/6158849?hl=en.
-
Enable Google Calendar API in the project. More info here https://support.google.com/googleapi/answer/6158841
-
Configure permission scopes
calendar.events.readonly
&userinfo.email
in the consent screen section.
- Add
https://us-east-1.recall.ai/api/v1/calendar/google_oauth_callback/
as a redirect URI for the OAuth client id. (_Note: For development purpose, see below for moving app to production/submitting for verification_)
- Save the client credentials in your Recall workspace. https://us-east-1.recall.ai/dashboard/platforms/google
Building Google OAuth 2.0 URL
Each user in your application must connect their Google calendar via OAuth before using calendar integration. The process for connection is triggered by redirecting user to the OAuth URL.
The URL structure should be as follows:
https://accounts.google.com/o/oauth2/v2/auth?
scope={SCOPES}
&access_type=offline
&prompt=consent
&include_granted_scopes=true
&response_type=code
&state={STATE}
&redirect_uri={REDIRECT_URI}
&client_id={CLIENT_ID}
- SCOPES
This parameter should be space seperated string containing required scopes which arecalendar.events.readonly
&userinfo.email
.
Sample value:
https://www.googleapis.com/auth/calendar.events.readonly https://www.googleapis.com/auth/userinfo.email
-
REDIRECT_URI
This parameter should be one of theredirect_uri
s configured in your Google OAuth 2.0 client. -
CLIENT_ID
This parameter should be your Google OAuth 2.0 client'sclient_id
property. -
STATE
This parameter needs to be a JSON stringified object, which should contain
a.recall_calendar_auth_token
: The calendar auth token for the user. (required)
b.google_oauth_redirect_url
: The redirect_uri (should be same as REDIRECT_URI parameter in the url) (required)
c.success_url
: The URL to redirect the user to once authentication has completed (optional)
d.error_url
: The URL to redirect the user if the authentication errored (optional)
Sample value:
state=JSON.stringify({
recall_calendar_auth_token: AUTH_TOKEN_HERE,
google_oauth_redirect_url: REDIRECT_URI_HERE,
success_url: https://yourdomain.com/google-calendar-connection/success,
error_url: https://yourdomain.com/google-calendar-connection/success,
})
Going to Production: Getting Approval
The first step in the approval process is to fill out your app information. You should do so at the following link: https://console.cloud.google.com/apis/credentials/consent/edit
The next step is to select the scopes you are requesting through the OAuth interaction. The 2 scopes you require for the Recall Calendar integration are
calendar.events.readonly
(sensitive scope)userinfo.email
(non-sensitive scope)
For the "How will the scopes be used?" section, you should explain why your app requires calendar permissions as well as any other scopes you request. In terms of the calendar permissions specifically, something like:
"We need access to the /auth/calendar.events.readonly scope in order to automatically record our user's video conference meetings on their "primary" calendar. We read event data in order to find video conference events that our users have scheduled."
The demo video should walk through the process of signing up to your app, approving the permissions through the OAuth flow, and showing the interface to sync and mark meetings to be recorded. This is the official guide to the elements that need to be shown in the app demonstration video.
Remember to update your Redirect URI before submitting!
If your redirect URI is
recall.ai
or any other domain that you don't own, Google will reject your submission.
Before submitting your Google OAuth Application to production, please ensure to update the redirect_uri
to be on your own domain (rather than being on recall.ai domain) as Google requires to verify domain ownership of each of the redirect URIs added in the app.
For example, add https://your_website_domain/api/google_oauth_callback
as redirect_uri
. In the request handler for above URL, return a HTTP redirect response to /ahttps://us-east-1.recall.ai/api/v1/calendar/google_oauth_callback/
.
All request query parameters should be forwarded as is from your domain to recall.ai's OAuth endpoint.
Updated 4 months ago