"auth sdk failed" when running zoom sdk demo

Description
I follow the instructions here https://marketplace.zoom.us/docs/sdk/native-sdks/windows/getting-started/build-run-play

When running the zoom sdk demo, I always get “auth sdk failed”.

Which version?
latest version download from zoom github

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. compile zoom sdk demo
  2. start sdk_demo_v2.exe
    Snap 2020-12-02 at 11.47.49
  3. I am not sure what to input here, so I click “setdomain” directly
  4. I already create an JWT app from maketplace, so I paste its JWT token to it.
  5. click auth
    get “auth sdk failed”.

Device (please complete the following information):

  • OS: Windows 10

other info
The zoom sdk guide said after click SetDomain, the next step will " Then in the following screen, you will be asked to enter your SDK keys & secrets .". But in my test, it ask me to input “sdk JWT token”. I don’t know why.

1 Like

Sdk version: (version: v5.2.42037.1112)
OS: Win 10
I created jwt app on marketplace. Generate jwt token and use it in sdk app runned from code. And result was the same as described before (error message “auth sdk failed”). I tried to create sdk app as well and generate jwt token on jwt.io with settings:
{
“appKey”: “xxxxxxxxxxxxxxxxxxxxxx”,
“iat”: 1609913345,
“exp”: 1609993345, (less than 2 days after iat)
“tokenExp”: 1609999345 (more than 1/2 hour after exp)
}
But same result (message “auth sdk failed”).

I have successfully authenticated.
(Version:v5.2.41727.0928)
OS:Windows10
IDE:VisualStudio2017

I think the following topics will be helpful.


I solved my question. My “iat” was pointing to future. And iat is in short the timestamp symbolized time of token creation. It should not point to the future.

Hey @kiyevin101,

Thank you for using the dev forum!

The default placeholder text “https://zoom.us” should work for the domain on the screen in your screenshot. This is just to specify what network domain you would like to use. For example, if you were in the UK you could do “https://zoom.uk” so that you connect to servers closer to you.

For the JWT issue: Are you pasting the JWT directly from the JWT tile of the Zoom Marketplace? If so, this will cause the error. The JWT provided in the JWT tile is for the Zoom API, not the SDK’s. To authenticate the SDK, you have to make a JWT out of your SDK Key and SDK Secret.

Thanks!
Michael

Hi.

No matter what I tried on http://jwt.io/ - it always fail with “Auth SDK failed”.
can you please provide a step by step instructions on how to generate the correct token?

thanks

1 Like

Hey @it.it,

Thanks for using the developer forum!

To get a sample JWT for using the SDK, you can do the following:

  1. Log into Zoom Marketplace
  2. Click the “Build App” button in the top left corner
  3. Click the “View Here” button in the “SDK” tile
  4. You should now see your SDK key and SDK secret
  5. Go to https://jwt.io/ and scroll down until you see this page:
  6. Replace the payload in the right hand side with this payload:

{
“appKey”: “string”,
“iat”: 0,
“exp”: 0,
“tokenExp”: 0
}

  1. Copy your SDK Key from the Zoom Marketplace (in this example, I will use 1234ABC for the key) and paste it inside the quotes where it says string, next to appKey in the payload.
  2. Go to https://www.epochconverter.com/
  3. And you will see the current time in epoch format here:
  4. Copy that value and place it where the 0 is next to iat in the jwt payload
  5. Now on epoch converter.com, set the date 1 day in the future, as I am writing this it is the 16th so I will set this to be the 17th
  6. Click “Human date to Timestamp” and copy the value here:
  7. Paste this to replace the 0 next to both exp and tokenExp in the payload. (These don’t have to be the same value, and they also don’t have to be a date 1 day from now, this is just for example):
  8. So now your payload should look like this:
    Screen Shot 2021-01-15 at 8.37.09 PM
  9. You can hover over these numbers and it should show you the date in readable format:
  10. Now copy your SDK Secret from the Zoom Marketplace and paste it into the box that says “your 256 bit secret”. Leave “secret base64 encoded” unchecked:
    Screen Shot 2021-01-15 at 8.42.18 PM
  11. For this example I am going to use 5678DEF for my sdk secret. Your screen should now look like this:
  12. Your JWT is the text that is on the left under “Encoded”. Copy this directly, do not click the “Share JWT” button:
  13. Paste this text directly into the demo app box when it asks you to auth.

Please let me know if that works.
Thanks!
Michael

1 Like

Hi Michael

thanks for the very detailed answer!

  1. I did manage to get a valid JWT token - thanks, but alas - the demo app is still throwing the next error (empty error description):

Error Type: LastErrorType_Meeting
Error Code: 0
Error Description:

  1. for other readers - please notice that the quotation marks in the payload are wrong - you’ll need to use the regular/neutral quotation marks instead of the curved/typographic quotation marks
    more details about the difference are here - How & When to Use Quotation Marks | Study.com.

seems like this forum is preventing us from using the regular/neutral one. kind of weird for a technical forum :slight_smile:

thanks again!

Hey @it.it,

Awesome! I am happy to hear it helps, and yes it is a bummer the forum changes the quotes :frowning:.
As for your error, the error code 0 actually means “No error”.

Thanks!
Michael

1 Like

Hello Michael,
Is that a change you´ve made in the demo where instead of App Key // App Secret screen, you´ve changed to JWT screen to authenticate the SDK ?

Because I´m having the same behavior, in your guide it says after domain screen, I should inform App Key // App Secret on the screen, but I´m getting the JWT screen instead.

Is the guide outdated? The way now is to create manually a JWT and authenticate?
Or there is a way to get the SDK keys & secrets screen and use it instead ?

Hey @soluzione.ltda,

Thanks for using the dev forum!

Yes, that guide is outdated unfortunately. We will work to get that updated as soon as possible.
The behavior of the demo app has changed since then. Despite recommending developers to use JWT’s instead of SDK key’s and secrets, many developers would use key’s and secrets which introduces security vulnerabilities. We do not encourage developers to authenticate the SDK using a key and secret anymore. The demo applications have been updated to reflect this ongoing security effort. If you run into issues creating a JWT, please let me know and I can assist there :slight_smile:

Thanks!
Michael

hi @Michael_Condon
I refer to App Marketplace link and download latest version Windows zoom sdk(zoom-sdk-windows-5.7.1.644). then generating JWT by https://zoomdevelopersupport.zendesk.com/hc/en-us/articles/360056168291-How-to-create-a-sample-JWT-for-the-Client-SDK. but click Auth toast Auth failed! how can i to fix it?

Hey @vary,

Thanks for using the dev forum!

What SDKErrors are you seeing when you try to auth?

Thanks!
Michael

any sdkerrors info find。only toast auth sdk falied like picture

@Michael_Condon
run android zoom sdk(zoom-sdk-android-5.7.1.1267) show below info
2038-01-17 02:53:47.777 23317-23317/us.zoom.sdkexample W/AndroidKeysetManager: keyset not found, will generate a new one
java.io.FileNotFoundException: can’t read keyset; the pref value androidx_security_crypto_encrypted_prefs_key_keyset does not exist
at com.google.crypto.tink.integration.android.SharedPrefKeysetReader.readPref(SharedPrefKeysetReader.java:71)
at com.google.crypto.tink.integration.android.SharedPrefKeysetReader.readEncrypted(SharedPrefKeysetReader.java:89)
at com.google.crypto.tink.KeysetHandle.read(KeysetHandle.java:105)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.read(AndroidKeysetManager.java:311)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewKeyset(AndroidKeysetManager.java:287)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:238)
at com.zipow.videobox.util.ZMEncryptedSharedPreferences.a(ZMEncryptedSharedPreferences.java:1169)
at com.zipow.videobox.util.PreferenceUtil.getSharedPreferences(PreferenceUtil.java:336)
at com.zipow.videobox.util.PreferenceUtil.readStringValue(PreferenceUtil.java:431)
at org.webrtc.voiceengine.VoiceEngineCompat.selectAudioDeviceAPIType(VoiceEngineCompat.java:221)
at org.webrtc.voiceengine.VoiceEngineCompat.isBluetoothScoSupported(VoiceEngineCompat.java:149)
at com.zipow.videobox.VideoBoxApplication.onSDKCreated(VideoBoxApplication.java:2224)
at com.zipow.videobox.VideoBoxApplication.initializeForSDK(VideoBoxApplication.java:2203)
at us.zoom.sdk.ZoomSDK.initialize(ZoomSDK.java:394)
at us.zoom.sdksample.initsdk.InitAuthSDKHelper.initSDK(InitAuthSDKHelper.java:47)
at us.zoom.sdksample.ui.InitAuthSDKActivity.onCreate(InitAuthSDKActivity.java:87)
at android.app.Activity.performCreate(Activity.java:7037)
at android.app.Activity.performCreate(Activity.java:7028)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2771)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2903)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1610)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6602)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:453)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:821)

Hey @vary,

Are you using the Windows SDK or the Android SDK?

Thanks!
Michael

@Michael_Condon android and Windows both use for test zoom sdk in China。

Hey @vary,

Can you provide your code? Please omit any private data.

Thanks!
Michael