Start or join external meetings (ZAK)

View as Markdown

People (not bots) can use the Meeting SDK to start or join a meeting signed in to their Zoom account using a Zoom Access Key (ZAK) token. For example, someone might connect a calendar scheduling app from the Zoom App Marketplace to their Zoom account with OAuth, then join the meeting from your website using the Meeting SDK for web.

Pass in the user's ZAK token to start or join a meeting with their Zoom identity or pass in an alternative host's  ZAK token to start a webinar.

Note: If the user clicks Sign Me Out from All Devices  in their Zoom profile, Zoom invalidates any existing prior ZAK tokens.

  1. Implement an OAuth flow and request an access token. Use this access token to authorize subsequent API requests.

  2. Use the Get a user's token API to get a ZAK token. When you use this API, tokens expire after:

    • 2 hours for regular users identified by userID.
    • 90 days for API users created with custCreate.

    You can also set a custom time to live (TTL) for the token, up to a maximum of one year. It's a best practice to get the ZAK token right before you start the meeting.

    Endpoint: GET https://api.zoom.us/v2/users/{userId}/token?type=zak

    Request Header:

    {
        "Authorization": "Bearer {{ACCESS_TOKEN}}"
    }
    

    Response Code: 200 OK

    Response Body:

    {
        "token": "{{ZAK_TOKEN}}"
    }
    
  3. Pass the ZAK token to the Meeting SDK to start or join the Zoom user's meeting or webinar. The role in the JWT determines whether the meeting will be started or joined with the ZAK: 1 to start, 0 to join.

    private fun startMeeting(zak: String) {
    
        val meetingService = ZoomSDK.getInstance().meetingService
    
        val startParams = StartMeetingParamsWithoutLogin().apply {
            zoomAccessToken = zak
            meetingNo = ""
        }
    
        meetingService.addListener(meetingServiceListener)
    
        val result = meetingService.startMeetingWithParams(this, startParams, StartMeetingOptions())
    
        if (result == MeetingError.MEETING_ERROR_SUCCESS) {
            // The SDK will attempt to join the meeting.
        }
    }