Download the Zoom SDK


Login to the Zoom App Marketplace using your Zoom account, click the Develop option in the dropdown on the top-right corner and select Build App.

Next, click the Create button and provide the required details if you haven’t already created an SDK app.

If you previously created an SDK app on the Marketplace, click the View here option and navigate to the Download page. Click Electron to download the Electron SDK.

See Create an SDK app for details.

The windows-electron-sdk and mac-electron-sdk are unified into one single SDK. The structure of the SDK consists of the node-interface and the node-core:

  • Node-interface: contains all the implementations of the V8 engine
  • Node-core: contains all the uniform interfaces for both Windows and Mac

Due to the open source nature of this SDK, you will be able to configure and compile the new Zoom Electron SDK with any version of Electron.

Prerequisites

To get started, you need:

  • A Zoom Account: If you do not have one, you can sign up at https://zoom.us/signup.
  • A device with the following version of macOS or Windows OS:
    • macOS 10.10 or later
    • Windows 7 or later (Windows 10 UWP not supported)
  • Protobuf 3.13.0 (see below for details)

Installation

Structure of Zoom Electron SDK

The Zoom Electron SDK is structured in the following manner:

├── [sdk]
  ├── [mac] <-- Node file built by Zoom for mac
  ├── [win32] <-- Node file built by Zoom for win
├── binding.gyp 
├── build_nodeaddon_mac.sh <-- use to rebuild node 
				file for mac
├── build_nodeaddon_win_ia32.bat <-- use to rebuild 
				node file for win
├── readme.txt / readme.md
├── run_demo_mac.sh
├── run_demo_win.bat <-- use to run demo for win
├── [demo] <-- demo app is inside
└── [lib] <-- js files and source code of 
			Zoom Electron SDK
			build_nodeaddon_mac.sh
			build_nodeaddon_win_ia32.bat 

Development environment configuration

Before running the demo app or rebuilding the Electron SDK, setup the development environment configurations based on your platform.

Note: The Electron SDK is sensitive to the Electron and node.js versions. Be sure to use the versions shown below.

Development environment configuration for Windows

Notes Windows requires building with Visual Studio 2019. The Windows Electron add-on is 32bit.

  1. Install node.js version 12.18.0: https://nodejs.org/download/release/v12.18.0/

  2. Install electron version 11.0.1. Run:
    npm install --arch=ia32 --save-dev electron@11.0.1 -g

  3. Run npm install node-gyp@8.3.0 -g to install node-gyp version 8.3.0 (higher versions may cause errors)

  4. Run npm install bindings -g to install bindings.

  5. Follow the steps below to install protobuf 3.13.0

    • Download the protobuf 3.13.0 source file
    • Rename the src folder to protobuf_src
    • Copy the protobuf_src folder into the lib/node_add_on folder.
    • To build the x86 version, run build_nodeaddon_win_ia32.bat
    • To build the x64 version, run build_nodeaddon_win_x64.bar
    • See Build with different protobuf version to build with a more recent version of protobuf.
  6. Make sure you installed msvc-2019 and python 2.7.

    • npm config set msvs_version 2019
    • npm config set python python2.7
    • npm config set npm_config_arch ia32
    • npm config set npm_config_target_arch ia32

Development environment configuration for macOS

  1. Install node.js version 12.18.0, either from this link: https://nodejs.org/download/release/v12.18.0/
    Or by running:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)

and

sudo brew install node` to install node.js
  1. Install electron version 11.0.1. Run:
    npm install --arch=ia32 --save-dev electron@11.0.1 -g

  2. Run npm install node-gyp@8.3.0 -g to install node-gyp version 8.3.0 (higher versions may cause errors)

  3. Run npm install bindings -g to install bindings.

  4. Follow the steps below to install protobuf 3.13.0

    • Download the protobuf 3.13.0 source file
    • Rename the src folder to protobuf_src
    • Copy the protobuf_src folder into the lib/node_add_on folder.
    • Run build_nodeaddon_mac.sh
    • See Build with different protobuf version to build with a more recent version of protobuf.

On macOS, the SDK will verify the signature of all libraries. When the SDK libraries have been resigned, call the setTeamIdentifier interface to set the organization unit (ou) of the signature before initializing in the app. For example:

setTeamIdentifier(“the ou of certificate”);

Otherwise, some features, such as virtual background will not work after resigning the app.

Build with different protobuf version

If you would like to use a version of protobuf higher than 3.13.0, in addition to the steps described above, you must also perform the following steps:

  1. Download the execution file of the corresponding protobuf and add its directory into the system path
  2. In the terminal, navigate to the root directory of the Electron SDK (on the same level as the build_nodeaddon file)
  3. Run the following command in the terminal to generate an electron_sdk_pb.js file:
protoc.exe —js_out=import_style=common.js,binary:. lib/electron_sdk_proto

After generating this file, you will be able to use the interfaces provided by the Electron SDK.

Run Electron SDK demo

To run the demo app:

On Windows

  1. Navigate to the root directory of the SDK package (same level as the README file).
  2. Run npm install to install the required dependencies to run the demo app
  3. Run run_demo_win.bat to run the zoom demo.

On macOS

  1. Navigate to the root directory of the SDK package (same level as this README file)
  2. Run npm install to install the required dependencies to run the demo app.
  3. Run run_demo_mac.sh to run the demo app.

Note: Due to the macOS security mechanism, the demo app will be blocked from launching the first time. Go to System Preference > Security & Privacy > General > Allow for the demo app to be able to run it.

Creating an installer and publishing

Follow official documentation for packaging an Electron app and complete the following additional steps if creating an installer for Windows.

  1. Run cptinstall.exe -uninstall with administrator privileges in the final stage of the installation (after all the related files of the SDK are copied successfully). This is to ensure that some users who have installed the old package can use the share function normally.
  2. When publishing your app to Windows, copy the following Microsoft runtime libraries to the bin and bin/aomhost directories:
concrt140.dll
msvcp140.dll
msvcp140_1.dll
msvcp140_2.dll
msvcp140_codecvt_ids.dll
vccorlib140.dll
vcruntime140.dll 
api-ms-win-core-console-l1-1-0.dll 
api-ms-win-core-console-l1-2-0.dll 
api-ms-win-core-datetime-l1-1-0.dll 
api-ms-win-core-debug-l1-1-0.dll 
api-ms-win-core-errorhandling-l1-1-0.dll 
api-ms-win-core-file-l1-1-0.dll 
api-ms-win-core-file-l1-2-0.dll 
api-ms-win-core-file-l2-1-0.dll 
api-ms-win-core-handle-l1-1-0.dll 
api-ms-win-core-heap-l1-1-0.dll 
api-ms-win-core-interlocked-l1-1-0.dll 
api-ms-win-core-libraryloader-l1-1-0.dll 
api-ms-win-core-localization-l1-2-0.dll 
api-ms-win-core-memory-l1-1-0.dll 
api-ms-win-core-namedpipe-l1-1-0.dll 
api-ms-win-core-processenvironment-l1-1-0.dll 
api-ms-win-core-processthreads-l1-1-0.dll 
api-ms-win-core-processthreads-l1-1-1.dll 
api-ms-win-core-profile-l1-1-0.dll 
api-ms-win-core-rtlsupport-l1-1-0.dll 
api-ms-win-core-string-l1-1-0.dll 
api-ms-win-core-synch-l1-1-0.dll 
api-ms-win-core-synch-l1-2-0.dll 
api-ms-win-core-sysinfo-l1-1-0.dll 
api-ms-win-core-timezone-l1-1-0.dll 
api-ms-win-core-util-l1-1-0.dll 
API-MS-Win-core-xstate-l2-1-0.dll 
api-ms-win-crt-conio-l1-1-0.dll 
api-ms-win-crt-convert-l1-1-0.dll 
api-ms-win-crt-environment-l1-1-0.dll 
api-ms-win-crt-filesystem-l1-1-0.dll 
api-ms-win-crt-heap-l1-1-0.dll 
api-ms-win-crt-locale-l1-1-0.dll 
api-ms-win-crt-math-l1-1-0.dll 
api-ms-win-crt-multibyte-l1-1-0.dll 
api-ms-win-crt-private-l1-1-0.dll 
api-ms-win-crt-process-l1-1-0.dll 
api-ms-win-crt-runtime-l1-1-0.dll 
api-ms-win-crt-stdio-l1-1-0.dll 
api-ms-win-crt-string-l1-1-0.dll 
api-ms-win-crt-time-l1-1-0.dll 
api-ms-win-crt-utility-l1-1-0.dll 
ucrtbase.dll

Custom UI Legal Notice Design

If you are using Custom UI, follow the UI Legal Notices design guidance.

Initializing SDK with JWT token

When initializing the SDK, you will need to compose a JWT token using your SDK key & secret.

How to compose JWT token for SDK initialization

You may generate your JWT token using the online tool https://jwt.io/. We highly recommended that you generate your JWT token in your backend server.

JWT is generated with three core parts: Header, Payload, and Signature. When combined, these parts are separated by a period to form a token: aaaaa.bbbbb.cccc.

Follow this template to compose your payload for SDK initialization:

Header

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

Payload

{
         "appKey": "string",     // Your SDK key
         "iat": long,   // access token issue timestamp (unit: second)
         "exp": long,  // access token expire timestamp, MAX: iat + 2 days (unit: second)
         "tokenExp": long // token expire timestamp, MIN:iat + 30 minutes (unit: second)
}

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

Signature

HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  "Your SDK secret here"
)

You do not need to secret base64 encode your signature. Once the JWT token is generated, do not reveal it or publish it.

We highly recommend that you handle your SDK key and secret and generate JWT in a backend server to be consumed by your application. Do not generate JWT in a production application.

Frequently Asked Question (FAQ)

  1. How do you sign the Electron SDK app on macOS? Why does my Electron SDK app crash on macOS after signing?

Use the following command to sign the Electron SDK app on macOS:

codesign --force --verify --verbose --entitlements runtime.entitlements --options runtime --sign "Developer ID Application: Name (ID)" (App path)

Note: You MUST use runtime entitlement to sign your Electron SDK on MacOS, and the entitlement MUST include the permission to use “Audio Input” and “Camera”, otherwise, the app will crash due to an Apple privacy violation.