About Events and Conferencing with conf_grant_id

If you specify a conferencing provider that isn’t available to your user’s account, you need to include the conf_grant_id that belongs to a provider with the supported conference type. For example, if you specify the provider is Google Meet and the user authenticated with a Microsoft account, you need to define the conf_grant_id. If the provider is Zoom Meeting, you always need to specify a conf_grant_id.

When you specify a conf_grant_id, the user that belongs to the specified grant ID acts as a conference host. They need to join the conference at the scheduled time and admit other participants during the meeting.

this is written in API docs. I have provider with google. so I cant use other provider conferencing types or can I ?

if yes where can I find conf_grant_id for example for zoom. or should I create zoom conference via api

thanks for help.

Yes, you can use other conferencing providers even if your user authenticated with Google. The conf_grant_id allows you to specify a different grant for conference creation.To use Zoom conferencing with your Google-authenticated user, you need to:

  1. Create a separate Zoom authentication for the user who will host the conference. This creates a Zoom grant ID that you’ll use as the conf_grant_id.
  2. Get the Zoom grant ID by authenticating with Zoom using either:
    Hosted OAuth: Start authentication with Zoom and exchange the code for a grant ID
    Custom authentication: Use an existing Zoom refresh token
    Here’s how to authenticate with Zoom using Hosted OAuth:
https://api.us.nylas.com/v3/connect/auth? client_id=<NYLAS_CLIENT_ID> &redirect_uri=https://myapp.com/callback-handler // Your application's callback_uri. &response_type=code &access_type=offline &provider=zoom

Then exchange the code for a grant ID:

curl --request POST \ --url 'https://api.us.nylas.com/v3/connect/token' \ --header 'Content-Type: application/json' \ --header 'Authorization: <sensitive_data>' \ --data '{ "code": "<NYLAS_CODE>", "client_id": "<NYLAS_CLIENT_ID>", "client_secret": "<sensitive_data>", "redirect_uri": "https://myapp.example.com/callback", "grant_type": "authorization_code" }'

Use the Zoom grant ID when creating events with Zoom conferencing:

conferencing:curl --request POST \ --url 'https://api.us.nylas.com/v3/grants/<NYLAS_GRANT_ID>/events?calendar_id=<CALENDAR_ID>' \ --header 'Accept: application/json, application/gzip' \ --header 'Authorization: Bearer <sensitive_data>' \ --header 'Content-Type: application/json' \ --data '{ "title": "Philosophy Club Zoom Meeting", "status": "confirmed", "busy": true, "conferencing": { "provider": "Zoom Meeting", "autocreate": { "conf_grant_id": "<USER_ZOOM_GRANT_ID>" } }, "participants": [ { "name": "Leyah Miller", "email": "leyah@example.com" }, { "name": "Nyla", "email": "nyla@example.com" } ], "description": "Come ready to talk philosophy!", "when": { "start_time": 1674604800, "end_time": 1722382420, "start_timezone": "America/New_York", "end_timezone": "America/New_York" } }'

Important: You must first create a Zoom OAuth application and Zoom connector in your Nylas application before you can authenticate users with Zoom. The user specified in conf_grant_id acts as the conference host and needs to join the conference to admit other participants.

You can find docs for creating the Zoom conf_grant_id here.