# Bug: Creating session with Session Error: 7

**URL:** <https://devforum.zoom.us/t/bug-creating-session-with-session-error-7/43874>\
**Category:** Android\
**Created:** [February 21, 2021, 10:15am UTC](https://devforum.zoom.us/t/bug-creating-session-with-session-error-7/43874 "2021-02-21T10:15:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johann](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@Johann](https://devforum.zoom.us/u/Johann)\
**Post date:** [February 21, 2021, 10:15am UTC](https://devforum.zoom.us/t/bug-creating-session-with-session-error-7/43874/1 "2021-02-21T10:15:24Z")

</div>

There are a few bugs in the current SDK that should be fixed. Without this fix, you end up with the Session Error: 7

1. Liine 58 in JWTUtil.java shows the following:  
`payLoadObject.put("typ", "JWT");`  
This is incorrect. It should be:  
`headerObject.put("typ", "JWT");`

2. The tpc field is missing in the code. It is required:  
`payLoadObject.put("tpc", "test");`

I had trouble still getting it to work until I realized that the user\_identity field in the JWT token had to match up exactly as what the user inputs in the input field on the Create Session screen. Once I did that, it worked. So the following JWT is one that works:

```auto
  "app_key": "xxx",
  "version": 1,
  "user_identity": "Johann",
  "iat": 1613902856,
  "exp": 1613989256,
  "tpc": "test"
}

```

---

<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:** [February 22, 2021, 8:04pm UTC](https://devforum.zoom.us/t/bug-creating-session-with-session-error-7/43874/2 "2021-02-22T20:04:19Z")

</div>

Hi @Johann, thanks for bringing this to our attention.

Please note that the code being used in the sample app is only for demonstrative purposes. We do not recommend generating your JWT on the client side as it may expose your developer credentials. The only truly secure way of transmitting your key/secret is to generate the JWT on your own servers.

Thanks!

---

<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:** [March 25, 2021, 6:05am UTC](https://devforum.zoom.us/t/bug-creating-session-with-session-error-7/43874/3 "2021-03-25T06:05:02Z")

</div>

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