Cannot start scheduled meeting in android SDK which is created using API

Description
Hi There,

I have created scheduled meeting using API, but when i try to join or start meeting, every time it says meeting id is not valid.

can anyone help me on this.

below is meeting details

{
  "uuid": "Ko9fO+BJShudj71MuiQmBg==",
  "id": 76436325746,
  "host_id": "OcVP5NTIQ3OGmdNk3ZSZ6w",
  "host_email": "jovy@mirobotic.sg",
  "topic": "test 5",
  "type": 2,
  "status": "waiting",
  "start_time": "2022-01-06T10:00:23Z",
  "duration": 30,
  "timezone": "Asia/Singapore",
  "agenda": "test 5",
  "created_at": "2022-01-06T10:00:23Z",
  "start_url": "xxx",
  "join_url": "xxx",
  "password": "123456",
  "h323_password": "123456",
  "pstn_password": "123456",
  "encrypted_password": "d2lKVTdFWWc1TkUzck90YnZtdjZSZz09",
  "pmi": "5780712337",
  "settings": {
    "host_video": true,
    "participant_video": true,
    "cn_meeting": false,
    "in_meeting": true,
    "join_before_host": true,
    "jbh_time": 0,
    "mute_upon_entry": false,
    "watermark": false,
    "use_pmi": true,
    "approval_type": 2,
    "audio": "both",
    "auto_recording": "none",
    "enforce_login": false,
    "enforce_login_domains": "",
    "alternative_hosts": "",
    "close_registration": false,
    "show_share_button": false,
    "allow_multiple_devices": false,
    "registrants_confirmation_email": true,
    "waiting_room": true,
    "request_permission_to_unmute_participants": false,
    "registrants_email_notification": true,
    "meeting_authentication": false,
    "encryption_type": "enhanced_encryption",
    "approved_or_denied_countries_or_regions": {
      "enable": false
    },
    "breakout_room": {
      "enable": false
    },
    "alternative_hosts_email_notification": true,
    "device_testing": false,
    "focus_mode": false,
    "private_meeting": false
  },
  "pre_schedule": false
}

I’m trying to join meeting as below in android

 JoinMeetingHelper().joinMeeting(
            context,
            zoom,
            meetingDetails.id.toString(),
            meetingDetails.password,
            meetingDetails.topic
        )

Hi @jovy, thanks for the post.

Can you please provide a code snippet showing direct usage of the SDK? The code snippet you’ve provided appears to be a modified version of the SDK sample app, so it’s difficult to tell exactly how the SDK is being used.

Thanks!

Hi @jon.zoom

we are using zoom web APIs to create schedueld meeting and using zoom SDK to join meetings
code to create meeting,

Code in fragment to create meeting
            val meeting = MeetingDetails(
                title,
                type,
                "${date}T${time}",
                duration,
                mainViewModel.email.value!!,
                TimeZone.getDefault().displayName,
                password,
                agenda,
                Settings.getDefaultSettings()
            )

            mainViewModel.createMeeting(meeting, apiResponseListener)

Create meeting API call and response parsing 
fun createMeeting(meetingDetails: MeetingDetails, apiResponseListener: ApiResponseListener<MeetingDetails>) {

        val call = apiInterface.addMeeting(userId.value!!, meetingDetails)

        call.enqueue(object : Callback<ResponseBody> {

            override fun onFailure(call: Call<ResponseBody>, t: Throwable) {
                Log.e(TAG, "Error: ${t.printStackTrace()}")
                apiResponseListener.onError("No internet access")
            }

            override fun onResponse(call: Call<ResponseBody>, response: Response<ResponseBody>) {

                if (response.body() != null) {
                    val body = response.body()?.string()
                    Log.e(TAG,"meeting ??> $body")

                    try {
                        val data: MeetingDetails = Gson().fromJson(body, MeetingDetails::class.java)
                        apiResponseListener.onData(data)
                        return
                    }catch (e: Exception) {
                        e.printStackTrace()
                    }

                    apiResponseListener.onError("Internal Error!")
                    return
                }
                var error = "Server error"
                try {
                    if (response.errorBody() != null) {
                        val obj = JSONObject(response.errorBody()!!.string())
                        if (obj.has("message")) {
                            error = obj.getString("message")
                        }
                    }
                }catch (e: Exception) {
                }
                Log.e(TAG,"res: ${response.errorBody()?.string()}")
                apiResponseListener.onError(error)
            }
        })

    }
Retrofit API Call
    @POST("v2/users/{userId}/meetings")
    fun addMeeting(@Path("userId") userId: String, @Body meetingDetails: MeetingDetails): Call<ResponseBody>

code to join meeting using zoom SDK

    fun joinMeeting(context: Context, meetingDetails: MeetingDetails) {
        Log.e(TAG,"joinMeeting $meetingDetails")

        JoinMeetingHelper().joinMeeting(
            context,
            zoom,
            meetingDetails.id.toString(),
            meetingDetails.password,
            meetingDetails.topic
        )
    }

Hi @jovy,

The JoinMeetingHelper being used here is not part of the SDK. Can you please provide a code snippet showing your direct usage of the SDK so I can see what’s going on? Also, what is the meeting number value you are passing into the SDK?

Thanks!

Hi @jon.zoom

JoinMeetingHelper is provided in SDK sample from zoom apps.
below is code for JoinMeetingHelper class

class JoinMeetingHelper {

    /**
     * This method will join the meeting with specified ID and Password
     *
     * @param context     the usual context
     * @param instance    the instance of [ZoomSDK]
     * @param id          the id of the meeting
     * @param password    the password for meeting
     * @param displayName the name that will be displayed to others
     */
    fun joinMeeting(
        context: Context,
        instance: ZoomSDK,
        id: String,
        password: String,
        displayName: String
    ): Int {

        val meetingService: MeetingService = instance.meetingService ?: return 0

        val jmo = JoinMeetingOptions()
        // some available options
        // jmo.no_driving_mode = true;
        // jmo.no_invite = true;
        // jmo.no_meeting_end_message = true;
        // jmo.no_titlebar = true;
        // jmo.no_bottom_toolbar = true;
        // jmo.no_dial_in_via_phone = true;
        // jmo.no_dial_out_to_phone = true;
        // jmo.no_disconnect_audio = true;
        // jmo.no_share = true;
        // jmo.invite_options = InviteOptions.INVITE_VIA_EMAIL + InviteOptions.INVITE_VIA_SMS;
        // jmo.no_audio = true;
        // jmo.no_video = true;
        // jmo.meeting_views_options = MeetingViewsOptions.NO_BUTTON_SHARE;
        // jmo.no_meeting_error_message = true;
        // jmo.participant_id = "participant id";

        // here we will define all the required parameters such as name id and pwd
        val jmp = JoinMeetingParams()
        jmp.displayName = displayName
        jmp.meetingNo = id
        jmp.password = password

        // you can avoid returning anything too
        return meetingService.joinMeetingWithParams(context, jmp, jmo)

    }

}

Hi @jovy,

Thanks for the code snippet. Can you also please provide which value from the JSON you posted earlier is being passed into the SDK as previously requested?

Thanks!

Hi @jon.zoom
below is json data I’m sending while creating scheduled meeting
url = https://api.zoom.us/v2/users/jovy@mirobotic.sg/meetings
request body as,

{
  "agenda": "Good morning",
  "created_at": "",
  "duration": "30",
  "host_email": "",
  "host_id": "",
  "id": 0,
  "join_url": "",
  "password": "123456",
  "schedule_for": "jovy@mirobotic.sg",
  "settings": {
    "cn_meeting": false,
    "host_video": true,
    "in_meeting": true,
    "join_before_host": true,
    "mute_upon_entry": false,
    "participant_video": true,
    "registrants_email_notification": true,
    "use_pmi": true,
    "watermark": false
  },
  "start_time": "2022-02-03T9:30",
  "start_url": "",
  "status": "",
  "timezone": "India Standard Time",
  "topic": "Test meetings",
  "type": 2,
  "uuid": ""
}

response as,

{
  "uuid": "Ko9fO+BJShudj71MuiQmBg==",
  "id": 71726842180,
  "host_id": "OcVP5NTIQ3OGmdNk3ZSZ6w",
  "host_email": "jovy@mirobotic.sg",
  "topic": "Test meetings",
  "type": 2,
  "status": "waiting",
  "start_time": "2022-02-01T04:11:42Z",
  "duration": 30,
  "timezone": "Asia/Singapore",
  "agenda": "Good morning",
  "created_at": "2022-02-01T04:11:42Z",
  "start_url": "https://us04web.zoom.us/s/5780712337?zak=eyJ0eXAiOiJKV1QiLCJzdiI6IjAwMDAwMSIsInptX3NrbSI6InptX28ybSIsImFsZyI6IkhTMjU2In0.eyJhdWQiOiJjbGllbnRzbSIsInVpZCI6Ik9jVlA1TlRJUTNPR21kTmszWlNaNnciLCJpc3MiOiJ3ZWIiLCJzayI6Ijg0NjU4MzIzMjc4NDgxMjA1MjIiLCJzdHkiOjEwMCwid2NkIjoidXMwNCIsImNsdCI6MCwibW51bSI6IjU3ODA3MTIzMzciLCJleHAiOjE2NDM2OTU5MDMsImlhdCI6MTY0MzY4ODcwMywiYWlkIjoicmpkOHA0QjRUMUtfd1RJdk1uTFp1dyIsImNpZCI6IiJ9.kuO3IdLtMz_dCoayx_QgemA-geqDZzS71hcNPL6P4UY",
  "join_url": "https://us04web.zoom.us/j/5780712337?pwd=8MJJVnWu31c3IkcfRg7z99WjOEA2Ch.1",
  "password": "123456",
  "h323_password": "123456",
  "pstn_password": "123456",
  "encrypted_password": "8MJJVnWu31c3IkcfRg7z99WjOEA2Ch.1",
  "pmi": "5780712337",
  "settings": {
    "host_video": true,
    "participant_video": true,
    "cn_meeting": false,
    "in_meeting": true,
    "join_before_host": true,
    "jbh_time": 0,
    "mute_upon_entry": false,
    "watermark": false,
    "use_pmi": true,
    "approval_type": 2,
    "audio": "both",
    "auto_recording": "none",
    "enforce_login": false,
    "enforce_login_domains": "",
    "alternative_hosts": "",
    "close_registration": false,
    "show_share_button": false,
    "allow_multiple_devices": false,
    "registrants_confirmation_email": true,
    "waiting_room": true,
    "request_permission_to_unmute_participants": false,
    "registrants_email_notification": true,
    "meeting_authentication": false,
    "encryption_type": "enhanced_encryption",
    "approved_or_denied_countries_or_regions": {
      "enable": false
    },
    "breakout_room": {
      "enable": false
    },
    "alternative_hosts_email_notification": true,
    "device_testing": false,
    "focus_mode": false,
    "private_meeting": false,
    "email_notification": true
  },
  "pre_schedule": false
}

Hi @jovy,

Sorry, I am not asking for the JSON data you are sending or receiving. I am asking which field from the response you are passing into the SDK.

Thanks!

Hi @jon.zoom ,
I’m passing following fields to join meeting,

id as Meeting No
password as Password
topic as Display name

example

   val jmp = JoinMeetingParams()
        jmp.displayName = topic
        jmp.meetingNo = id
        jmp.password = password

Hi @jovy,

The value you are providing for the meetingNo field does not exist according to our back end, so the SDK is working as intended when it says that the meeting ID is invalid. The meeting associated with that UUID is the pmi value.

Thanks!

Hi @jon.zoom
Its working for me now.
thanks for your help! :smile:

Glad I could help!

Please don’t hesitate to reach back out in a new topic with any additional questions. :slightly_smiling_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.