Getting Null value when decode JWT Token

Description
Took the JWT Token from the App Credentials. I have attached in the screenshot. I checked it in jwt.io for validating, there it’s showing Invalid JWT token error. I am not getting token in the following API also,

https://api.zoom.us/v2/users/developscriptsllc@gmail.com/token?type=token&access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOm51bGwsImlzcyI6IkgzZzc5ZzRMUWVteElKdldYTjRnRmciLCJleHAiOjE1ODU3Mzk3NTAsImlhdCI6MTU4NTczNDM1MH0.W8rG98bOlqp4n0Jru6UCbJF1CQeczZ2E_u-H_TUELww

Hey @developscriptsllc,

Can you try regenerating your API Secret and try again?

Thanks,
Tommy

@tommy Thanks for the reply, i tried regenerating API Secret, but i am getting the same error. I am attaching thr screenshot also.

I am using Mobile SDK for iOS, joining a Meeting is working perfectly. Now I’m stuck in the Start a Meeting, kindly help on this.

Hey @developscriptsllc,

Reassigning to @Carson_Chen for Mobile SDK.

Thanks,
Tommy

Hello @Carson_Chen any updates on this?

Hi developscriptsllc,

Thanks for using Zoom SDK. If you trying to use Zoom token and Zoom access token to start a meeting, you may follow the instruction here: https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/start-join-meeting/api-user/authentication to authenticate with Zoom API and use the token to start a meeting. Our demo app also has this implementation: https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/SDKPresenters/how_to_start_join_meeting/start_with_rest_api_user/SDKStartJoinMeetingPresenter%2BRestApiWithoutLoginUser.m

Hope this helps. Thanks!

@Carson_Chen i am already following the documentation, to generate Zoom Token and ZAK i need a JWT token. In my question i said, the JWT token provided in the App Credentials is wrong. That’s why i am not able to the Zoom token.

If you see the screenshots, you’ll understand my problem. Please help me in this.

Thanks

Hi developscriptsllc,

Thanks for the reply. I understand the issue you are facing: You are trying to authenticate with Zoom REST API to get the Zoom token to start a meeting with iOS SDK. I am not sure why you are getting an extra field “aid” but if you would like to start a meeting with zoom token, our demo app has the exact implementation showing how to authentication with Zoom REST API and how to use it to start a meeting: https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/SDKPresenters/how_to_start_join_meeting/start_with_rest_api_user/SDKStartJoinMeetingPresenter%2BRestApiWithoutLoginUser.m . I have just tested this implementation with our demo app and it is working. Hope this helps. Thanks!

Hello @Carson_Chen i tried the sample code provided in the Github -> Code Snippet from Github

Still i am getting Invalid access token, here i am attaching the code.

  • (void)startMeeting_RestApiWithoutLoginUser:(BOOL)appShare
    {
    MobileRTCMeetingService *ms = [[MobileRTC sharedRTC] getMeetingService];
    //Sample for Start Param interface
    MobileRTCMeetingStartParam * param = nil;

    //Sample: How to Get Token or ZAK via RestAPI
    NSString * token = [self requestTokenOrZAKWithType:MobileRTCSampleTokenType_Token];
    NSString * ZAK = [self requestTokenOrZAKWithType:MobileRTCSampleTokenType_ZAK];

    MobileRTCMeetingStartParam4WithoutLoginUser * user = [[MobileRTCMeetingStartParam4WithoutLoginUser alloc]init];
    user.userType = MobileRTCUserType_APIUser;
    user.meetingNumber = @“some_random_number”;
    user.userName = @“name”;
    user.userToken = token;
    user.userID = @“my_email”;
    user.isAppShare = appShare;
    user.zak = ZAK;
    param = user;

    MobileRTCMeetError ret = [ms startMeetingWithStartParam:param];
    NSLog(@“onMeetNow ret:%d”, ret);
    return;
    }

If you suggest me a better way to share the APIKey and APISecret, i will share that also for your reference.

And i need one more clarification, Only login user can schedule a Meeting or any user with Zoom Token and Zoom Access Token can schedule a meeting?

Thanks.

Hi developscriptsllc,

Thanks for the reply. Yes, I was testing with the exact same code you are using. So the problem might be the key&secrets. Could you try to deactivate your JWT app on Marketplace and then re-activate again and see if it helps? If the issue persists, please let me know and I will find another way to help you.

If you are using PreMeetingService to schedule a meeting, then it is only for the login user. For non-login user, you may schedule a meeting using Zoom API.

Hope this helps. Thanks!