# Can not get SSO token for SDK

**URL:** <https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358>\
**Category:** Electron\
**Created:** [October 21, 2019, 11:52pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358 "2019-10-21T23:52:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [October 21, 2019, 11:52pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/1 "2019-10-21T23:52:28Z")

</div>

**Description/Error**  
I have created an OAuth app, and have turned on all scopes.

**Which Endpoint/s?**

> **[Get a User Token - Users - Zoom API - API Reference](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usertoken)**
>
> Retrieve a user's token. This token is used for starting meetings with the Client SDK.
> Scopes: user:read:admin user:read
> If a user signed into Zoom usin...

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

1. [https://zoom.us/v2/users/{userId}/token](https://zoom.us/v2/users/%7BuserId%7D/token)
2. “{“code”:4700,“message”:“Invalid access token, does not contain scopes: [user:write:admin, zms:user:write]”}”

**Additional context**  
I am not sure what scopes I am missing.

Thanks,  
Nate

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 22, 2019, 4:27pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/2 "2019-10-22T16:27:34Z")

</div>

Hey @nate,

Are you using a [user-managed OAuth app](https://marketplace.zoom.us/docs/guides/getting-started/app-types/create-oauth-app#register-your-app)?

If so can you try passing in `me` as the `{userId}?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [October 22, 2019, 5:22pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/3 "2019-10-22T17:22:19Z")

</div>

Hi tommy,

Does that work with just passing in the authToken as the identification of the user, as that is all I have on the server side to make that request for them.

Thanks,

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 22, 2019, 5:25pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/4 "2019-10-22T17:25:10Z")

</div>

Hey @nate,

If you pass in `me` as the `{userId}` it references the owner of the `access_token` who made the request to get the [Client SDK token](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usertoken).

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [October 22, 2019, 5:51pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/5 "2019-10-22T17:51:11Z")

</div>

I tried to pass in ‘me’ in the URL and got this response.

 ![Screen Shot 2019-10-22 at 10.49.33 AM.png](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/e/edfb24eaa78a6da2ac76ab0fdab3a6a60c912b8e.png)

Thanks,

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 22, 2019, 6:37pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/6 "2019-10-22T18:37:28Z")

</div>

Hey @nate, apologies for not being more clear.

Once you have your [OAuth access\_token](https://marketplace.zoom.us/docs/guides/authorization/oauth/oauth-with-zoom#request-access-token), use `me` in your request here:

GET [https://zoom.us/v2/users/me/token](https://zoom.us/v2/users/me/token)

If this doesn’t clear things up then schedule a Zoom call with me so I can assist further 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [October 31, 2019, 11:24pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/7 "2019-10-31T23:24:58Z")

</div>

After I got the token, I tried to use it but it just give me a login in failure. I tried to use your demo app and it also fails login. I this the way we should be using this token?

---

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [October 31, 2019, 11:26pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/8 "2019-10-31T23:26:10Z")

</div>

I put a customer support ticket before I remembered that wasn’t the right place for this question.  
[https://support.zoom.us/hc/en-us/requests/1839757](https://support.zoom.us/hc/en-us/requests/1839757)

If you could close that ticket it would be good.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [November 1, 2019, 3:48pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/9 "2019-11-01T15:48:53Z")

</div>

Hey @nate,

What error are you getting and what SDK are you trying to use?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [November 1, 2019, 4:09pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/10 "2019-11-01T16:09:47Z")

</div>

I am using the Electron SDK. I get a status of 3 back from the LoginInWithSSOToken

 ![00%20AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/d/dddf4ba7a87a56384131a0b5247ac7cd51c05a2c.png)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [November 1, 2019, 5:02pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/11 "2019-11-01T17:02:21Z")

</div>

Hey @nate,

After speaking with @carson.zoom, the token generated from [GET /users/{userId}/token](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usertoken) is for joining and starting meetings without having to login. Not for logging users into the Electron SDK. Apologies for the confusion.

The SSO token should be generated by your Identity Provider(IDP), not from us. Here are more details about SSO login with Zoom:

> **[Getting Started with SSO](https://support.zoom.us/hc/en-us/articles/201363003-Getting-Started-with-SSO)**
>
> Overview
> Single sign-on allows you to login using your company credentials. Zoom single sign-on (SSO) is based on SAML 2.0.
> Zoom acts as the Service Provider (SP), and offers automatic user provisi...

The correct way to use the Electron SDK would be to have the user login. Or use the [ZAK token](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usertoken) to start / join meetings. Details here:

> **[Zoom Token & Zoom Access Token(ZAK) - Preface - Native SDKs - Zoom...](https://marketplace.zoom.us/docs/sdk/native-sdks/preface/zak)**
>
> Zoom Token & Zoom Access Token (ZAK) -- Non-login User Only
> 
> 
> 
> Contents
> 
> 
> 
> For Non-login users, the following three values are required to make API requ...

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [November 5, 2019, 4:31pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/12 "2019-11-05T16:31:33Z")

</div>

So we should be able to start the meeting and join the meeting without logging in. But after I use this token will Zoom use the correct user in the meeting?

Is there a way that we can discuss Carson about a way to login to SDK with a token from OAuth.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [November 5, 2019, 9:55pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/13 "2019-11-05T21:55:14Z")

</div>

Hi nate,

Thanks for the reply. If you authenticate with Zoom API and get zoom token and zak to start/join a meeting, then the Zoom SDK will recognize the user and show in the meeting.

The Zoom SDK does not support OAuth authentication at the moment.

Thanks!

---

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [November 5, 2019, 10:17pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/14 "2019-11-05T22:17:54Z")

</div>

Thanks for the reply Carson. I will be trying to use the zak token

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [November 5, 2019, 10:32pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/15 "2019-11-05T22:32:19Z")

</div>

Thanks for the help Carson!

Let us know if you have additional questions @nate!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [November 6, 2019, 12:27am UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/16 "2019-11-06T00:27:13Z")

</div>

Hi Tommy, and @carson.zoom

I am still having some issues getting the meeting started.

I am calling  
StartMeetingWithOutLogin(  
{“zoomaccesstoken”:“myzak”,“userid”:“myuserid”,“usertoken”:“myaccesstoken”,“isvideooff”:true}  
)

The usertoken is the access token I get from the refresh token  
and the zoomaccesstoken is the zak token using [https://zoom.us/v2/users/me/token?type=zak](https://zoom.us/v2/users/me/token?type=zak)  
But I get the result of: SDKERR\_INVALID\_PARAMETER

Is there something I am missing or have incorrect here?

Thanks,

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [November 7, 2019, 1:34am UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/17 "2019-11-07T01:34:28Z")

</div>

Hi [nate](https://devforum.zoom.us/u/nate),

Thanks for the reply.

- The `zoomaccesstoken` is the zak you got from [https://zoom.us/v2/users/me/token?type=zak](https://zoom.us/v2/users/me/token?type=zak)
- The `userid` is the userId or the user email you got from [https://marketplace.zoom.us/docs/api-reference/zoom-api/users/user](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/user)
- The `usertoken` is the zoom token you got from [https://zoom.us/v2/users/me/token?type=token](https://zoom.us/v2/users/me/token?type=token)

Besides the parameters, you also need to provide more information to be able to start a meeting, such as meeting number, displayname(username), you could find the list of parameters/options here:[https://github.com/zoom/zoom-sdk-electron/blob/master/lib/zoom\_meeting.js#L63](https://github.com/zoom/zoom-sdk-electron/blob/master/lib/zoom_meeting.js#L63)

Thanks!

---

<div class="post-metadata">

**Author:** ![nate](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nate/32/1812_2.png) [@nate](https://devforum.zoom.us/u/nate)\
**Post date:** [November 7, 2019, 8:06am UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/18 "2019-11-07T08:06:30Z")

</div>

Hi @carson.zoom ,

Thanks for the reply. I have seen the values there in the zoom\_meeting.js before. My issue is I don’t know which values are required. I also didn’t know I needed a meeting number to start a meeting. So I should first create a meeting on the oauth side? Then I will be able to be host of the meeting?

Thanks,

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [November 8, 2019, 11:07pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/21 "2019-11-08T23:07:16Z")

</div>

Hi [nate](https://devforum.zoom.us/u/nate),

Thanks for the reply. You may find the required parameters/info for starting a meeting with ZAK here: [https://marketplace.zoom.us/docs/sdk/native-sdks/preface/zak](https://marketplace.zoom.us/docs/sdk/native-sdks/preface/zak).

To start a meeting with ZAK, here are the brief steps:

1. Authenticate with Zoom API using your API key & secret
2. Schedule a meeting
3. Pass the meeting number, displayname, userId, zoom token, zak to the startMeetingWithoutLogin method to start a meeting with ZAK
4. If you are using the API key & secret that scheduled the meeting, you will be the host; Otherwise, you will join as an attendee.

Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 7:01pm UTC](https://devforum.zoom.us/t/can-not-get-sso-token-for-sdk/6358/22 "2020-08-21T19:01:03Z")

</div>

Closed on August 21, 2020, 7:01pm UTC


