# com.saasbee.webapp.security.token.LoginToken cannot be cast

**URL:** <https://devforum.zoom.us/t/com-saasbee-webapp-security-token-logintoken-cannot-be-cast/1350>\
**Category:** API and Webhooks\
**Created:** [June 13, 2018, 6:57am UTC](https://devforum.zoom.us/t/com-saasbee-webapp-security-token-logintoken-cannot-be-cast/1350 "2018-06-13T06:57:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodrigo\_Janz](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@Rodrigo\_Janz](https://devforum.zoom.us/u/Rodrigo_Janz)\
**Post date:** [June 13, 2018, 6:57am UTC](https://devforum.zoom.us/t/com-saasbee-webapp-security-token-logintoken-cannot-be-cast/1350/1 "2018-06-13T06:57:21Z")

</div>

Hello!

&nbsp;

I’m starting to have an error while try to access meeting’s links created trough the API. I didn’t change anything on my code and now I started receiving the following message after clicking on a zoom meeting:

&nbsp;

com.saasbee.webapp.security.token.LoginToken cannot be cast to com.saasbee.webapp.security.token.RequestToken (-1)

&nbsp;

Does anyone have any idea what to do in this case?

---

<div class="post-metadata">

**Author:** ![TimZoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/timzoom/32/978_2.png) [@TimZoom](https://devforum.zoom.us/u/TimZoom)\
**Post date:** [June 13, 2018, 5:27pm UTC](https://devforum.zoom.us/t/com-saasbee-webapp-security-token-logintoken-cannot-be-cast/1350/2 "2018-06-13T17:27:17Z")

</div>

I haven’t seen this error before. Can you be more specific about what steps you are taking?

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Janz](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@Rodrigo\_Janz](https://devforum.zoom.us/u/Rodrigo_Janz)\
**Post date:** [June 17, 2018, 2:04am UTC](https://devforum.zoom.us/t/com-saasbee-webapp-security-token-logintoken-cannot-be-cast/1350/3 "2018-06-17T02:04:35Z")

</div>

Sure, thing. Tim  
I’m doing the following steps:

1. Create a meeting using zoom API (success)

2. Retrieve and users’ zpk token using API (sucess)

3.&nbsp;I built the meeting link: e.g:

[https://zoom.us/s/224377991?zpk=uUN3we-\_U3fC7VQt4M-fZte35vnfKrXlmXX7V2FzU60.BgQgZVR3ZlloZ3VXelpHS0dSSDB4SkRxZ3VUUXVxZDhrSEUAAAwzQ0JBdW9pWVMzcz0A](https://zoom.us/s/224377991?zpk=uUN3we-_U3fC7VQt4M-fZte35vnfKrXlmXX7V2FzU60.BgQgZVR3ZlloZ3VXelpHS0dSSDB4SkRxZ3VUUXVxZDhrSEUAAAwzQ0JBdW9pWVMzcz0A)

I got the following error:

**_com.saasbee.webapp.security.token.LoginToken cannot be cast to com.saasbee.webapp.security.token.RequestToken (-1)_**

If I try the link with /s/,&nbsp;  
[https://zoom.us/j/224377991?zpk=uUN3we-\_U3fC7VQt4M-fZte35vnfKrXlmXX7V2FzU60.BgQgZVR3ZlloZ3VXelpHS0dSSDB4SkRxZ3VUUXVxZDhrSEUAAAwzQ0JBdW9pWVMzcz0A](https://zoom.us/j/224377991?zpk=uUN3we-_U3fC7VQt4M-fZte35vnfKrXlmXX7V2FzU60.BgQgZVR3ZlloZ3VXelpHS0dSSDB4SkRxZ3VUUXVxZDhrSEUAAAwzQ0JBdW9pWVMzcz0A)

i got the following error

**(-1)**

I double checked my api credentials and meeting settings.&nbsp;  
The meeting only accepts users with my domain’s e-mails.&nbsp;

For testing, I rolled back my app to a previous version that was working. But the error is still happening, It’s been a little hard for me to understand what’s causing it.&nbsp; It would be great if anyone has any clue what’s causing it

Thanks!

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Janz](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@Rodrigo\_Janz](https://devforum.zoom.us/u/Rodrigo_Janz)\
**Post date:** [June 17, 2018, 2:36am UTC](https://devforum.zoom.us/t/com-saasbee-webapp-security-token-logintoken-cannot-be-cast/1350/4 "2018-06-17T02:36:32Z")

</div>

it looks like what’s causing this problem is the way I’m generating the zpk token for the user.&nbsp;  
I wasn’t adding the ‘token?type=zpk’ to the API request.&nbsp;

[https://api.zoom.us/v2/users/](https://api.zoom.us/v2/users/){{user id}}/token?type=zpk
