Sdk jwt token fail

Description
A clear and concise description of what the question is.

Which version?
Knowing the version can help us to identify your issue faster.

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

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

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

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Description
image

  1. build a sdk_demo_v2 (v5.0.24433.0616) in VS2019(sdk_demo_v2_2017.sln)
  2. run a sdk_demo_v2_2017.exe
  3. click SetDomain
  4. input a sdk jwt token but its alway failed

i tried 1 and 2

  1. JWT Token using JWT app in App Marketplace
  2. create JWT using https://jwt.io/
    PAYLOAD:DATA
    {
    “appKey”: SDK Key in SDK ,App MarketPlace,
    “iat”: 1595914941,
    “exp”: 1595916741,
    “tokenExp”: 1595918541
    }

Additional context
LastErrorType_Auth Error Code: 10000 or 10124. most error code is 10124.

Hi @collinpark,

Thanks for using Zoom SDK. It appears that the “tokenExp” timestamp is later than that in “exp”. Please try to set “exp” later than the “tokenExp”.

Hope this helps. Thanks!

Hi @carson.zoom

I have got almost the same issue

  1. build a zoom-sdk-windows-master(v5.0.24433.0616) in VS2017(sdk_demo_v2_2017.sln)
  2. run sdk_demo_v2_2017.exe
  3. click SetDomain with zoom.us
  4. input a sdk jwt token but its always failed

I create JWT using https://jwt.io/

and i get this

zoom_error

When i used AuthParam with key and secret, everything is ok

Hi @zhaowentao,

Thanks for the reply. The error code 10124 means the JWT token has an issue. Based on the information, your JWT token should work. Here are the requirements for the JWT payload:
1). The exp should be later than tokenExp
2). tokenExp should be a timestamp that is at least 30 minutes later than the iat

Please try to make exp larger (1 day later) and see if that helps.

Thanks!

Thanks @carson.zoom

I found the problem

You cannot add quotation marks to the secret field

There are some misunderstandings about the document before【

HMACSHA256(

base64UrlEncode(header) + “.” +

base64UrlEncode(payload),

"API_ SECRET"

)

】Has been reporting errors

Now use it instead【

HMACSHA256(

base64UrlEncode(header) + “.” +

base64UrlEncode(payload),

API_ SECRET)

】That’s fine

thanks but im still not fixed it.

i tried like this

{
“appKey”: “SD…aQ”,
“iat”: 1596420765,
“exp”: 1596424365,
“tokenExp”: 1596422565
}

HMACSHA256(
base64UrlEncode(header) + “.” +
base64UrlEncode(payload),

rvKiM…YT

) secret base64 encoded

2020-08-03 112015
2020-08-03 112115

Hi @zhaowentao,

Glad to hear that it is resolved. Yes, the APP_Secret in the signature cannot have the quotation marks.

Thanks!

Hi @collinpark,

Thanks for the reply. Based on the screenshot, it seems like the JWT token is incorrect since it is shown as an URL. The JWT token that the SDK is expecting is the encoded token that you get from the left part of the jwt.io.

tried like your reply.

  1. create JWT in https://jwt.io/

  1. copy left part encoded token and paste it to SDK Auth

주석 2020-08-04 141723

let me know its correct or not?

-. appKey is SDK’s SDK key in App Marketplace
-. secret is SDK’s SDK secret in App MarketPlace

and i created jwt in https://jwt.io/ and then just copy and paste in SDK app

its correct? or i need anything more?

That’s right.
But you should also check that “iat” is a date that has already started. (to check it, just look at the tooltip with the mouse) and also that “exp” is a date that has not expired and is greater than 30 minutes.
It works well for me.

thanks for your help

but its not work for me…
i tried like below

“iat”:1596695400,
“exp”:1596700800,
“tokenExp”:1596699000

and the result is 10124, LastErrorType_Auth.

“iat”:1596695400,
“exp”:1596700800,
“tokenExp”:1596700800

its also same.

Try with:

“exp”: 1596999999,
“iat”: 1596539022,
“tokenExp”: 1596999999

it still not work… just return 10124. anyway thanks

tried like this

“appKey”:"",
“iat”:1596539022,
“exp”:1596999999,
“tokenExp”:1596999999

HMACSHA256(
base64UrlEncode(header) + “.” +
base64UrlEncode(payload),

METepsN41RT4D4Bg4pzYExfnjw030EP*****

) secret base64 encoded

this jwt

The secret base64 encoded must be unchecked

yes. i did.
주석 2020-08-06 163719

With the help of this discussion I’m one step further - I get a success from

ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(param);

when using a token - BUT I get an AUTHRET_UNKNOWN from the onAuthenticationReturn event and I’m not able to login or start a meeting after that.

Thanks for any hints.

Try:

ZOOM_SDK_DOTNET_WRAP.SDKError er = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(new AuthParam { appKey = sdkKey, appSecret = sdkSecret });

The app in the marketplace must be of the “SDK” type and not “JWT”

1 Like

yes, i think its right type to “SDK”.
thanks!!

Hi, here’s a description of my issue, I am using VS 2017. Using (default) domain “https://zoom.us”, customized UI is disabled.

  • Using zoom-api-jwt to generate JWT:
    [if I try using API key / secret from SDK app in market place I get code: 124, message: ‘Invalid access token.’] I use JWT app instead:

const config = {
production:{
APIKey : ‘API Key, from JWT app in market place’,
APISecret : ‘API Secret, from JWT app in market place’
}

  • If I plug in resulting JWT directly into Zoom Win SDK I get AUTH SDK FAILED error

  • Alternatively, plug the resulting JWT into JWT.io to match the suggested format:

I get the same error regardless of whether secret base64 is checked , or whether I use JWT or SDK app API keys.
According to JWT webiste the signature is verified though.

Please advise