How to get email ID of a user in an `oauth` callback?

I tried passing a query param called email_id when I fired the API oauth/authorize so that I could receive this email in my callback response. However, the only thing I receive is code.

So my question is, how do we send/receive custom params while making such requests? Because there is no way to identify the email of the logged in user by the time I generate the access token.

Hey @abhilash,

To identify the user you can JWT parse the access_token.

Once parsed, you will see a JSON object like the following in which you can use the userId to get the users email.

{
  "ver": "4",
  "clientId": "gNNEzMeBSsfdasdXew_LLjIuAykw",
  "iss": "urn:zoom:connect:clientid:gNNEzMeBSsfdasdXew_LLjIuAykw",
  "authenticationId": "b2f92db1150d29209238314971dbb0a483a01",
  "env": [
    null
  ],
  "userId": "KdYKjni32mT4KPd8KK329dQtafFQ",
  "aud": "https://oauth.zoom.us",
  "accountId": "gVcjZnWfdWRLWvv_Gtaxg",
  "nbf": 1564512132,
  "exp": 1564515732,
  "tokenType": "access_token",
  "iat": 1564512132,
  "jti": "f01c9c41-00dd-440a-a0fc-5b6891d4884b",
  "toleranceId": 0
}

Let me know if this helps!

Thanks,
Tommy