# Android demo app session problem

**URL:** <https://devforum.zoom.us/t/android-demo-app-session-problem/57397>\
**Category:** Android\
**Created:** [September 14, 2021, 2:27am UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397 "2021-09-14T02:27:04Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![yevgeniyk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yevgeniyk/32/31030_2.png) [@yevgeniyk](https://devforum.zoom.us/u/yevgeniyk)\
**Post date:** [September 14, 2021, 2:27am UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/1 "2021-09-14T02:27:04Z")

</div>

**Description**  
Create session returns session error 7

**Which Mobile Video SDK version?**  
v1.1.1 (8665.0812)

Start demo app  
click “Create” in a first screen  
session error 7

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

**Smartphone (please complete the following information):**

- Device: Samsung j320a
- OS: Android 6.0.1

**Additional context**  
Header  
{“alg”:“HS256”,“typ”:“JWT”}

Payload  
{“app\_key”:SDK\_KEY,“version”:1,“iat”:1631583749,“exp”:1631727749,“user\_identity”:“test\_SAMSUNG-SM-J320A”,“tpc”:“test”}

Session name: yk session  
Password: “”

please let me know what can be the issue.  
SDK\_KEY is a key that i got while creating the application  
JWT is valid and generated by JWTUtil.

Additional question - logging is enabled by init parameters, but i do not see logs

Thank you  
Yevgeniy

---

<div class="post-metadata">

**Author:** ![yevgeniyk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yevgeniyk/32/31030_2.png) [@yevgeniyk](https://devforum.zoom.us/u/yevgeniyk)\
**Post date:** [September 14, 2021, 2:28am UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/2 "2021-09-14T02:28:23Z")

</div>

session name: yksession in one word

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [September 14, 2021, 9:43pm UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/3 "2021-09-14T21:43:11Z")

</div>

Hi @yevgeniyk, thanks for using our SDK.

If you look at our [error code documentation](https://marketplace.zoom.us/docs/sdk/video/android/errors), you will see that this error code is `Errors_Invalid_Parameter`. Upon inspection of your JWT payload, the culprit appears to be the `tpc` field. This field must be equivalent to the `sessionName` parameter, which in your case would be `yksession`.

Thanks!

---

<div class="post-metadata">

**Author:** ![yevgeniyk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yevgeniyk/32/31030_2.png) [@yevgeniyk](https://devforum.zoom.us/u/yevgeniyk)\
**Post date:** [September 15, 2021, 3:35am UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/4 "2021-09-15T03:35:31Z")

</div>

@jon.zoom ,  
thank you for your suggestion. Unfortunately, it does not work - problem persists.  
Are there any limitation on user identity? Looks like it is almost “hardcoded” - test\_ + Build.MODEL

JWT is definitely valid, i verified it with [jwt.io](http://jwt.io) - using SDK key as apiKey and apiSecret for signature verification.

Thank you  
Yevgeniy

---

<div class="post-metadata">

**Author:** ![yevgeniyk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yevgeniyk/32/31030_2.png) [@yevgeniyk](https://devforum.zoom.us/u/yevgeniyk)\
**Post date:** [September 15, 2021, 3:40am UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/5 "2021-09-15T03:40:45Z")

</div>

@jon.zoom ,  
i think i found a problem. Looks like sessionContext.userName for the session and user\_identity in JWT should be the same  
Please let me know.  
Thank you  
Yevgeniy

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [September 15, 2021, 7:28pm UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/6 "2021-09-15T19:28:54Z")

</div>

Hi @yevgeniyk,

You definitely do not need the `userName` and `user_identity` values to match. The username is meant to identify a user by other users in a session, commonly by using their actual first/last name. The `user_identity` field on the JWT is meant to act as an identifier you can use to differentiate between users in your own system (e.g. for tracking which accounts were in a session).

Did you make any other changes aside from those fields? I can successfully join a session when using different values.

Thanks!

---

<div class="post-metadata">

**Author:** ![yevgeniyk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yevgeniyk/32/31030_2.png) [@yevgeniyk](https://devforum.zoom.us/u/yevgeniyk)\
**Post date:** [September 15, 2021, 8:10pm UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/7 "2021-09-15T20:10:24Z")

</div>

@jon.zoom ,  
no additional changes.  
i tried from two different phones and i was able to share session. while session name is the same, user names are different on each phone - but on each phone user\_identity in JWT and userName in a session context are the same.  
I will try tomorrow change it back and will let you know  
thank you  
Yevgeniy

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [September 16, 2021, 8:29pm UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/8 "2021-09-16T20:29:56Z")

</div>

Hi @yevgeniyk,

Were you able to test this and verify whether or not you can use non-matching values for the `user_identity` and `userName` fields?

Thanks!

---

<div class="post-metadata">

**Author:** ![yevgeniyk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yevgeniyk/32/31030_2.png) [@yevgeniyk](https://devforum.zoom.us/u/yevgeniyk)\
**Post date:** [September 16, 2021, 11:30pm UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/9 "2021-09-16T23:30:39Z")

</div>

@jon.zoom  
yes, sorry for delay, i started by using two different phones to troubleshoot the issue.  
Looks like is it not necessary for both elements to have the same value - you are correct.  
However, after additional troubleshooting with multiple test i found that  
**test\_SAMSUNG-SM-J320A** - does not work  
**te-st\_SAMSUNG** - works.

Can you please try “test\_SAMSUNG-SM-J320A”? looks like characters do not matter, maybe size?  
In case of the demo code, the value is “hardcoded” as  
public static String customIdentity=“test\_”+ Build.MODEL;  
Considering that my phone model is SAMSUNG-SM-J320A…  
So when i change this value to userName, which is shorter, it started to work.

Hopefully, that is just a problem with demo code.

Please let me know the results of your testing

Thank you  
Yevgeniy

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [September 17, 2021, 5:50pm UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/10 "2021-09-17T17:50:03Z")

</div>

Hi @yevgeniyk,

There is a character limit on the `user_identity` field of 15 characters. It looks like this limitation was mistakenly removed from our documentation, so apologies for any inconvenience as we revert that change.

Thanks!

---

<div class="post-metadata">

**Author:** ![yevgeniyk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yevgeniyk/32/31030_2.png) [@yevgeniyk](https://devforum.zoom.us/u/yevgeniyk)\
**Post date:** [September 18, 2021, 4:35am UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/11 "2021-09-18T04:35:13Z")

</div>

Hi @jon.zoom ,  
that definitely explains 😀  
i guess demo code should be fixed also.

As for parameters,  
SDK secret for a signature creation, i assume that API is an account identifier,  
but what is a purpose of user identity? looks like it does not correspond to the user name on UI, so for tracking purposes in session dashboard?  
and password - is it password for session or user identity? looks like for session…  
Thank you  
Yevgeniy

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [September 20, 2021, 6:10pm UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/12 "2021-09-20T18:10:45Z")

</div>

Hi @yevgeniyk,

> i guess demo code should be fixed also.

We can definitely look into adding a character limit for the value generated in the sample app, that’s a good idea!

> SDK secret for a signature creation, i assume that API is an account identifier,

The account identifier is actually the SDK key. The secret is used to sign the JWT. If you’re interested in learning more about the how/why or JWTs, the spec can be found [here](https://datatracker.ietf.org/doc/html/rfc7519). 🙂

> but what is a purpose of user identity? looks like it does not correspond to the user name on UI, so for tracking purposes in session dashboard?

This allows you to provide your own tracking identity to a participant in a session. For example, if you generate an ID for each user when they register in your system, you could provide that ID so that you can associate the user’s information on your servers with the `ZoomVideoSDKUser` object in a session.

We also do not require that these values are unique, so another potential use case could be setting this value to identify a specific type of user.

> and password - is it password for session or user identity? looks like for session…

The password is for the session. If you are the first person joining the session (i.e. the user creating it), this is optional. If the user creating the session includes a password, it must be provided by any other users who wish to join that same session.

Thanks!

---

<div class="post-metadata">

**Author:** ![yevgeniyk](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/yevgeniyk/32/31030_2.png) [@yevgeniyk](https://devforum.zoom.us/u/yevgeniyk)\
**Post date:** [September 21, 2021, 4:01am UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/13 "2021-09-21T04:01:13Z")

</div>

@jon.zoom ,  
thank you for detailed explanations.  
Case is closed 🙂

Thank you again  
Yevgeniy

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [September 21, 2021, 6:14pm UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/14 "2021-09-21T18:14:21Z")

</div>

Glad I could help!

Don’t hesitate to reach back out in a new topic if you have any additional questions. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 22, 2021, 4:15am UTC](https://devforum.zoom.us/t/android-demo-app-session-problem/57397/15 "2021-10-22T04:15:00Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
