Why my userID alway is 16778240?

Description
userID alway is 16778240

Which Android Video SDK version?
zoom-video-sdk-android-1.1.1

I use JWTUtil.createJWTAccessToken to create token, apiKey and apiSecret i take from App credentials of Videos app sdk

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • OS: Android 10

thanks for the awesome information.

Hi @kenjivn, thanks for the post.

Can you please verify which method you are using to retrieve the ID?

Thanks!

1 Like

Hi @jon.lieblich,

  1. Init sdk:
    ZoomVideoSDKInitParams params = new ZoomVideoSDKInitParams();
    params.domain = "https://zoom.us"; // Required
    params.logFilePrefix = LOG_TAG; // Optional for debugging
    params.enableLog = true; // Optional for debugging
    ZoomVideoSDK sdk = ZoomVideoSDK.getInstance();
    int initResult = sdk.initialize(mContext, params);
  1. JoinOrCreateSession:
    ZoomVideoSDKSessionContext sessionContext = new ZoomVideoSDKSessionContext();
    sessionContext.sessionName = "zp95869048";

    String sessionId = "zp95869048";
    String userID = "demoabc";
    String apiKey; //from app
    String apiSecret; //from app

    sessionContext.userName = userID;
    sessionContext.token = JWTUtil.createJWTAccessToken(sessionId, userID, apiKey, apiSecret);
    ZoomVideoSDKSession session = ZoomVideoSDK.getInstance().joinSession(sessionContext);

  1. Get User info in onSessionJoin of ZoomVideoSDKDelegate:
 ZoomVideoSDKSession sdkSession = ZoomVideoSDK.getInstance().getSession();
 String userID = sdkSession.getMySelf().getUserID(); //userID return "16778240", not "demoabc"

Hi @kenjivn,

The value returned by getUserID is generated by Zoom’s back end. It seems that you are looking for the value provided in the user_identity field of the JWT, which would be retrieved from the getCustomIdentity method.

Thanks!