SDK Meeting - "Invalid sdkkey."

,

Hi. I have created a sdk meeting app in development and when I tested with sdkkey (client ID) of my app it said “Invalid sdkkey.” I see that my app is in “Draft” mode, is it the issue and how can I activate it?

My app: Screenshot by Lightshot, Screenshot by Lightshot

Zoom Version: 2.18.2

Please help me.

My Angular code:

import { Component, OnInit, Inject } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { DOCUMENT } from "@angular/common";

import { ZoomMtg } from "@zoomus/websdk";
import { AuthService } from "./shared/auth.service";
import { ActivatedRoute } from "@angular/router";
import Cookies from "js-cookie";
import { AppService } from "./app.service";

ZoomMtg.setZoomJSLib("https://source.zoom.us/2.18.2/lib", "/av");

ZoomMtg.preLoadWasm();
ZoomMtg.prepareWebSDK();
// loads language files, also passes any error messages to the ui
ZoomMtg.i18n.load("en-US");
ZoomMtg.i18n.reload("en-US");

@Component({
  selector: "app-root",
  templateUrl: "./app.component.html",
  styleUrls: ["./app.component.css"],
})
export class AppComponent implements OnInit {
  currentUser: any;
  appointmentId = "";
  meetingInfo = {
    meetingNumber: "",
    signature: "",
    password: "",
  };
  leaveUrl = "";

  constructor(
    public httpClient: HttpClient,
    private route: ActivatedRoute,
    @Inject(DOCUMENT) private document: Document,
    private authService: AuthService,
    private appService: AppService
  ) {
    this.route.queryParams.subscribe((query) => {
      if (query.appointmentId) this.appointmentId = query.appointmentId;
    });
  }

  ngOnInit() {
    this.authService.getCurrentUser().then((resp) => {
      this.currentUser = resp;
      this.leaveUrl =
        this.currentUser.type === "tutor"
          ? `${this.appService.settings.mainUrl}/users/appointments/${this.appointmentId}`
          : `${this.appService.settings.mainUrl}/users/lessons/${this.appointmentId}`;
      let stored = Cookies.get("zoomMeetingInfo");
      if (stored) {
        this.meetingInfo = JSON.parse(stored);
        this.startMeeting();
      }
    });
  }

  startMeeting() {
    document.getElementById("zmmtg-root").style.display = "block";
    console.log("sdk key: ", this.appService.settings.zoomSDK);

    ZoomMtg.init({
      leaveUrl: this.leaveUrl,
      success: (success) => {
        console.log(success);
        ZoomMtg.join({
          signature: this.meetingInfo.signature,
          meetingNumber: this.meetingInfo.meetingNumber,
          userName: this.currentUser.name,
          sdkKey: this.appService.settings.zoomSDK,
          userEmail: this.currentUser.email,
          passWord: this.meetingInfo.password,
          tk: "",
          success: (success) => {
            console.log(success);
          },
          error: (error) => {
            console.log(error);
          },
        });
      },
      error: (error) => {
        console.log(error);
      },
    });
  }
}

@tutorsbazaar111 ,

Are you able to capture your web tracking ID for me? Please tag me in your response

  1. Open up the console in your browser, and goto the network tab
  2. There should be a call to info?Meeting…
  3. On the payload, try to find the tracking ID and share it with me here

Thanks for your reply.
this is tracking ID from headers:
v=2.0;clid=us06;rid=WEB_1f79888c499aaa94fbb3ffcd6160ce62

[redacted for privacy]

@tutorsbazaar111 ,

your appKey and sdkKey in the JWT token is xxxx, you need to put in the valid Client ID instead

Can you explain more, I can make sure that the sdkKey I put was the Client ID of my app:

https://prnt.sc/N_YdVLMTBxth

@tutorsbazaar111 ,

When I decode your JWT token, it seems you used an invalid value “xxxx” as the sdkKey and appKey

Please let me know where I can get the correct SDK key

@tutorsbazaar111

The Client ID on the top left is your SDK Key

As I mentioned, I put it and you said it was invalid

@tutorsbazaar111 ,

This was the JWT token which you have shared

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJ4eHh4IiwibW4iOiI4MTEzNDk5NTE3NyIsInJvbGUiOjEsImlhdCI6MTcwMzU4NTM0MywiZXhwIjoxNzAzNTkyNTQzLCJhcHBLZXkiOiJ4eHh4IiwidG9rZW5FeHAiOjE3MDM1OTI1NDN9.TMezxZWm1bMlRzmZdRDiJa5GlxYht09kIuc_zRWwn6w

If you decode it using jwt.io, you can see the results here.

Note that sdkKey and appKey is “xxxx”. This not a valid value.
You need to sign your JWT token again with your SDK Key which starts with WB7AR…

My mistake, I have just tried with the correct key and now it says " Uncaught ReferenceError: React is not defined" and “Uncaught TypeError: m.AK.connectSocket is not a function”

@tutorsbazaar111 , if you are using react with client view, could you make sure you are using react 16? React 17 and React 18 is not support for client view

I am not using react, I am using angular 10, you can check the code that I shared

@tutorsbazaar111 do open a new thread for this new error. Tag me there and I’ll look at it.