How To Get Zoom token and User ID while integrating the sdk with android?

,

 i followed your developer api section and GitHub also . iam confused how to get all data required to start a meeting ?

i integrated my application  the with android sdk in android studio  and i followed your example  but when try to a start meeting it required user id and zoom token

 meetingService.startMeeting(this, USER\_ID, ZOOM\_TOKEN, STYPE, MEETING\_ID, DISPLAY\_NAME, opts)
 


should i use create user api to create an user and then obtain this data (user ID and zoom token)
 ? and if user already exist i should login to get these credentials every time i want to start a meeting??

iam using a test account So i couldn't use create user api because i haven't the privilege.
 please give me clear step to start meeting from android sdk with the test account .
Thanks

 

Hi Mina,

   There are two options and you can chose one of them depending on what your app workflow is.

(1) You can use the /user/create API, create a user, get the user id and pass it to the function OR 

(2) you can get the zoom e-mail/password of the user and pass it to function

If you are using a test account, you could get a 60 day free trial to use the API - sign up at zoom.us/developer. If not, just go with option-2 where you can just pass your zoom username/password. 

Thanks, Wei @ Zoom

 

 

 

Thanks For Your Respond 

i have another question

how to remove meeting id from waiting screen 

i used 

opts.meeting\_views\_options = MeetingViewsOptions.NO\_TEXT\_MEETING\_ID;

but it removed id from live meeting screen only

Hi Mina,

Zoom Android SDK supports customize waiting room experience. Please take a look at the documentation at https://github.com/zoom/zoom-sdk-android. Section 8 in the docx file explains how to achieve this goal.

Best

Thanks for your respond,

I followed the .docx in section 8  and added the following code and handled listeners. 

but i still find your waiting screen not the custom one. in the other hand i downloaded your example from GitHub  and run the code also i find your waiting screen not the custom one also.

 

 

<activity android:name=".sdkexample2.MyWaitJoinActivity"
android:icon="@drawable/ic_launcher"
>
<intent-filter>
<action android:name=“com.app.name.intent.action.JoinBeforeHost” />
<category android:name=“android.intent.category.DEFAULT” />
</intent-filter>
</activity>

 

 

BR

Hi Mina,

could you check one of your actions: <action android:name=“com.app.name.intent.action.JoinBeforeHost” />?

you should put your app’s name before “.intent.action.JoinBeforeHost”

Best

Thank you ,

already i used my app name but still have the problem that my waiting activity has not launched yet.

Hi Mina,

Did you try to run the sample we provided? It will demonstrate how to customize the waiting room experience. The project is called example, and you can take a look at MyWaitJoinActivity.java.

Best

Hey Wei,

I’m trying to access user’s email once the user logs in using the oAuth. As you mentioned above: “(2) you can get the zoom e-mail/password of the user and pass it to function”.

Can you please assist how do we get the user id?

The purpose is to let users login through zoom, get their user id and request zoom’s create meeting api (which required user id).

Thanks.

Hi subhan,
Thanks for using Zoom SDK. Regarding your questions:

Hope this helps. Thanks!

Manifest.xml

activity android:name=“com.example.navigationdrawer.MyWaitJoinActivity”
android:theme="@style/ZMTheme.MainWindow">
intent-filter>
action android:name=“com.example.navigationdrawer.intent.action.JoinBeforeHost” />
category android:name=“android.intent.category.DEFAULT” />
/intent-filter>
/activity>

MyWaitJoingActivity:

package com.example.navigationdrawer;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import us.zoom.androidlib.util.AndroidAppUtil;
import us.zoom.sdk.MeetingService;
import us.zoom.sdk.MeetingServiceListener;
import us.zoom.sdk.MeetingStatus;
import us.zoom.sdk.ZoomSDK;

public class MyWaitJoinActivity extends Activity implements View.OnClickListener, MeetingServiceListener {

private final static String TAG = "ZoomSDK";

private Button mLeave;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_my_wait_join);
    Intent intent = getIntent();
    String topic = intent.getStringExtra(AndroidAppUtil.EXTRA_TOPIC);
    long meetingId = intent.getLongExtra(AndroidAppUtil.EXTRA_MEETING_ID, 0);
    boolean isRepeat = intent.getBooleanExtra(AndroidAppUtil.EXTRA_IS_REPEAT, false);
    String date = intent.getStringExtra(AndroidAppUtil.EXTRA_DATE);
    String time = intent.getStringExtra(AndroidAppUtil.EXTRA_TIME);

    TextView txtTopic = (TextView)findViewById(R.id.txtTopic);
    if(topic != null)
        txtTopic.setText("Topic: " + topic);

    TextView txtMeetingId = (TextView)findViewById(R.id.txtMeetingId);
    if(meetingId > 0)
        txtMeetingId.setText("Meeting ID: " + meetingId);

    TextView txtIsRepeat = (TextView)findViewById(R.id.txtIsRepeat);
    txtIsRepeat.setText("Is Repeat Meeting: " + isRepeat);

    TextView txtTime = (TextView)findViewById(R.id.txtTime);
    if(time != null)
        txtTime.setText("Time: " + time);

    TextView txtDate = (TextView)findViewById(R.id.txtDate);

    if(date != null)
        txtDate.setText("Date: " + date);

    mLeave = (Button)findViewById(R.id.btnLeave);
    mLeave.setOnClickListener(this);

    ZoomSDK zoomSDK = ZoomSDK.getInstance();
    MeetingService meetingService = zoomSDK.getMeetingService();
    if(meetingService != null) {
        meetingService.addListener(this);
    }
}
private void onClickLeave() {
    ZoomSDK zoomSDK = ZoomSDK.getInstance();
    MeetingService meetingService = zoomSDK.getMeetingService();
    if(meetingService != null) {
        meetingService.leaveCurrentMeeting(false);
    }
    finish();
}

@Override
public void onBackPressed() {
    onClickLeave();
}

@Override
public void onMeetingStatusChanged(MeetingStatus meetingStatus, int errorCode,
                                   int internalErrorCode) {

    Log.i("TAG", "onMeetingStatusChanged, meetingStatus=" + meetingStatus + ", errorCode=" + errorCode
            + ", internalErrorCode=" + internalErrorCode);

    if(meetingStatus != MeetingStatus.MEETING_STATUS_WAITINGFORHOST) {
        finish();
    }
}

@Override
protected void onDestroy() {
    ZoomSDK zoomSDK = ZoomSDK.getInstance();

    if(zoomSDK.isInitialized()) {
        MeetingService meetingService = zoomSDK.getMeetingService();
        meetingService.removeListener(this);
    }

    super.onDestroy();
}

@Override
public void onClick(View v) {
    if(v.getId() == R.id.btnLeave) {
        onClickLeave();
    }
}

}

Still my waiting screen not showing?

My Meeting Settings.

I have to hide meeting ID from my users from waiting and joinbeforehost both screens.

@carson.zoom kindly help me quick guide will work.

Hi iqbalbhabha,

If you would like to customize the waiting room UI, you may follow the instruction here: https://marketplace.zoom.us/docs/sdk/native-sdks/android/techniques/customize-waiting-ui

If you want to hide the meeting ID in the meeting UI, you may customize the meeting ID using https://zoom.github.io/zoom-sdk-android/us/zoom/sdk/MeetingOptions.html#custom_meeting_id

Hope this helps. Thanks!


Did the same but not working?

No I dont want to hide meeting id from meeting UI its already done.
I want to hide it from Waiting UI and JoinBeforeHost.


My manifest and waitJoinactivity.
Everything is according to the documentation.
Why I am having issue?

Its been 7 days I haven’t got my reply yet.

Hi iqbalbhabha,

Thanks for providing the screenshots. Based on the code shown in the screenshots, everything looks good. If you are still not able to customize the waiting room, it could be your project could not find the configuration. Is your applicationId the same as your package name?

The following implementation in our demo app could be helpful(Please note that the applicationId and the package name is different in our demo app):

Hope this helps. Thanks!

Hello Team,
I have been Stuck in Zoom Authrisation process from last week.Kindly help me it’s usrgent.
Do i need to purchase any plan to make the sample app work that i have download from git hub for ios.
I have already sent my token,key and Secretkey on mail i.e beherasusanta3590@gmail.com
Kindly revert back asap.

Hi @beherasusanta3590,

Thanks for the reply. You do not need to purchase any plan to get SDK credentials and use the demo app. You may refer to the following steps:

  1. Follow the instruction here to create an SDK app on Marketplace and get the SDK credentials: https://marketplace.zoom.us/docs/guides/build/sdk-app
  2. Once you have the SDK key/secret, use the following template to compose your JWT token for SDK initialization:

** Header

{
  "alg": "HS256",
  "typ": "JWT"
}

** Payload

{
	   "appKey": "string", // Your SDK key
         "iat": long, // access token issue timestamp
         "exp": long, // access token expire timestamp
         "tokenExp": long // token expire timestamp, MIN:30 minutes
}

The minimum value of tokenExp should be at least 30 minutes, otherwise, SDK will reject the authentication request.
** Signature

HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  "Your SDK secret here"
)
  1. Download the latest version of iOS SDK from Github and open the project
  2. Open AppDelegate.h and paste the JWT token you just created in step 2. Then run the demo app.

If you need to use ZAK to start a meeting, you will also need to get the API key/secret from Marketplace and communicate with Zoom Rest API to get the ZAK. You may refer to the instruction here: https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/start-join-meeting/api-user/authentication
Hope this helps. Thanks!