# Advanced Sample App: GET /zoom/api/v2/users/me - 500 Internal Server Error

**URL:** <https://devforum.zoom.us/t/advanced-sample-app-get-zoom-api-v2-users-me-500-internal-server-error/101071>\
**Category:** Zoom Apps\
**Tags:** api\
**Created:** [January 2, 2024, 5:11pm UTC](https://devforum.zoom.us/t/advanced-sample-app-get-zoom-api-v2-users-me-500-internal-server-error/101071 "2024-01-02T17:11:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amgregory](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@amgregory](https://devforum.zoom.us/u/amgregory)\
**Post date:** [January 2, 2024, 5:11pm UTC](https://devforum.zoom.us/t/advanced-sample-app-get-zoom-api-v2-users-me-500-internal-server-error/101071/1 "2024-01-02T17:11:40Z")

</div>

**Zoom Apps Configuration**  
react js, node.js, express, docker

**Description**  
The API call to get user info fails (see screen recording). Sample app does not work as expected.

Screen Recording of GET /zoom/api/v2/users/me - 500 Internal Server Error:

> **[zoomapps-advancedsample-react-server-500-2024-01-02\_11-25-07.mp4](https://drive.google.com/file/d/1bzKXDSivKMtKTX3grsrAEPsRnTYzQMt2/view?usp=sharing)**
>
> Google Drive file.

**Error?**  
2024-01-02 11:24:46 backend-1 | GET /zoom/api/v2/users/me 500 1.356 ms - 328  
2024-01-02 11:24:46 backend-1 | Error: Error getting user from session:  
2024-01-02 11:24:46 backend-1 | at getUser (/home/node/app/api/zoom/middleware.js:21:17)  
2024-01-02 11:24:46 backend-1 | at processTicksAndRejections (node:internal/process/task\_queues:96:5)

**Troubleshooting Routes**  
Screen Recording of GET /zoom/api/v2/users/me - 500 Internal Server Error:

> **[zoomapps-advancedsample-react-server-500-2024-01-02\_11-25-07.mp4](https://drive.google.com/file/d/1bzKXDSivKMtKTX3grsrAEPsRnTYzQMt2/view?usp=sharing)**
>
> Google Drive file.

**How To Reproduce**

1. Follow steps on Github to create the Advanced Zoom Sample App.  
[GitHub - zoom/zoomapps-advancedsample-react: This repository contains an Advanced Zoom Apps Sample. It should serve as a starting point for you to build and test your own Zoom App in development.](https://github.com/zoom/zoomapps-advancedsample-react)
2. Launch the Advanced Zoom Sample App in the Zoom Client.
3. Click on the “authorize” button.

**Github Issue**

> <https://github.com/zoom/zoomapps-advancedsample-react/issues/13>
>
> The API call to get user info fails (see screen recording). Below is the error …message from the docker console. 
> 
> 2024-01-02 11:24:46 backend-1 | GET /zoom/api/v2/users/me 500 1.356 ms - 328
> 2024-01-02 11:24:46 backend-1 | Error: Error getting user from session: 
> 2024-01-02 11:24:46 backend-1 | at getUser (/home/node/app/api/zoom/middleware.js:21:17)
> 2024-01-02 11:24:46 backend-1 | at processTicksAndRejections (node:internal/process/task\_queues
> 
> 
> Screen Recording of GET /zoom/api/v2/users/me - 500 Internal Server Error:
> https://drive.google.com/file/d/1bzKXDSivKMtKTX3grsrAEPsRnTYzQMt2/view?usp=sharing
> 
> Screenshot of Error Message:
> https://drive.google.com/file/d/1ymb57nmyIaB0tQWjJ-maPF8lPwJCIuTb/view?usp=sharing
> 
> !\[zoomapps-advancedsample-react-server-500\](https://github.com/zoom/zoomapps-advancedsample-react/assets/140503073/8f1346b0-3eac-4b7a-954a-82344e232a7c)

---

<div class="post-metadata">

**Author:** ![imnathanbrooks](https://avatars.discourse-cdn.com/v4/letter/i/e99b99/32.png) [@imnathanbrooks](https://devforum.zoom.us/u/imnathanbrooks)\
**Post date:** [January 4, 2024, 10:20am UTC](https://devforum.zoom.us/t/advanced-sample-app-get-zoom-api-v2-users-me-500-internal-server-error/101071/2 "2024-01-04T10:20:05Z")

</div>

> [@amgregory](#):
>
> [GET /zoom/api/v2/users/me - 500 Internal Server Error · Issue #13 · zoom/zoomapps-advancedsample-react · GitHub](https://github.com/zoom/zoomapps-advancedsample-react/issues/13)

It seems like there’s an issue with retrieving user information from the Zoom API within the Advanced Sample App. The error message indicates a failure in fetching user data from the session, possibly within the middleware.

Given the error logs, the problem might stem from a specific function (`getUser` ) in the middleware file located at `/home/node/app/api/zoom/middleware.js`. There might be an issue with the authentication or authorization process when trying to fetch user data from the Zoom API.

Here are steps you can take to troubleshoot this:

1. **Check Authentication** : Ensure that the authorization process is correctly implemented within the app. Verify the credentials and tokens required to access the Zoom API.

2. **Review Middleware Function** : Investigate the `getUser` function in the `middleware.js` file. Check if it’s correctly handling the session or if there are any issues with retrieving user data.

3. **API Endpoint Testing** : Use tools like Postman or cURL to manually test the `GET /zoom/api/v2/users/me` endpoint with valid credentials. This helps verify if the issue is specific to the app or if it extends to the API itself. or check the [step by step method](https://climateretrofit.co.uk/eco4/)

4. **Debugging and Logging** : Implement additional logging within the `getUser` function or related code to track the flow of data and identify where the issue occurs. This could provide more insights into what’s failing.

5. **GitHub Repository** : Check the repository’s issues section or discussions on GitHub for any reported similar issues or resolutions provided by other contributors or maintainers.

6. **Version Compatibility** : Ensure that the versions of the libraries, frameworks (like React, Node.js), and dependencies used in the app are compatible and up-to-date.

---

<div class="post-metadata">

**Author:** ![amgregory](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@amgregory](https://devforum.zoom.us/u/amgregory)\
**Post date:** [May 14, 2024, 4:13pm UTC](https://devforum.zoom.us/t/advanced-sample-app-get-zoom-api-v2-users-me-500-internal-server-error/101071/3 "2024-05-14T16:13:41Z")

</div>

@imnathanbrooks Thank you for your response. Apparently the Add App button in the marketplace was not installing the app correctly, it was a known issue. The app works correctly when the install route “/api/zoomapp/install” is accessed directly.

> <https://github.com/zoom/zoomapps-advancedsample-react/issues/13#issuecomment-1874711375>
>
> The API call to get user info fails (see screen recording). Below is the error …message from the docker console. 
> 
> 2024-01-02 11:24:46 backend-1 | GET /zoom/api/v2/users/me 500 1.356 ms - 328
> 2024-01-02 11:24:46 backend-1 | Error: Error getting user from session: 
> 2024-01-02 11:24:46 backend-1 | at getUser (/home/node/app/api/zoom/middleware.js:21:17)
> 2024-01-02 11:24:46 backend-1 | at processTicksAndRejections (node:internal/process/task\_queues
> 
> 
> Screen Recording of GET /zoom/api/v2/users/me - 500 Internal Server Error:
> https://drive.google.com/file/d/1bzKXDSivKMtKTX3grsrAEPsRnTYzQMt2/view?usp=sharing
> 
> Screenshot of Error Message:
> https://drive.google.com/file/d/1ymb57nmyIaB0tQWjJ-maPF8lPwJCIuTb/view?usp=sharing
> 
> !\[zoomapps-advancedsample-react-server-500\](https://github.com/zoom/zoomapps-advancedsample-react/assets/140503073/8f1346b0-3eac-4b7a-954a-82344e232a7c)
