# Fetching user account info from a react spa

**URL:** <https://devforum.zoom.us/t/fetching-user-account-info-from-a-react-spa/25517>\
**Category:** API and Webhooks\
**Created:** [July 28, 2020, 10:08pm UTC](https://devforum.zoom.us/t/fetching-user-account-info-from-a-react-spa/25517 "2020-07-28T22:08:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![youry.stancatte](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/youry.stancatte/32/12612_2.png) [@youry.stancatte](https://devforum.zoom.us/u/youry.stancatte)\
**Post date:** [July 28, 2020, 10:08pm UTC](https://devforum.zoom.us/t/fetching-user-account-info-from-a-react-spa/25517/1 "2020-07-28T22:08:35Z")

</div>

**Description**  
I’m creating a app where the user uses internal gateway to get token access and in the front-end I want to fetch the user data, but i’m getting an error

Access to XMLHttpRequest at ‘[https://api.zoom.us/v2/users/me](https://api.zoom.us/v2/users/me)’ from origin …

const user = await axios.get(‘[https://api.zoom.us/v2/users/me](https://api.zoom.us/v2/users/me)’, {  
headers: {  
Authorization: `Bearer ${token}`,  
},  
});

what I’m doing wrong here?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 30, 2020, 9:41pm UTC](https://devforum.zoom.us/t/fetching-user-account-info-from-a-react-spa/25517/2 "2020-07-30T21:41:13Z")

</div>

Hey @youry.stancatte,

It sounds like you are making request to our API from the frontend (client side). You need to make the API requests from the backend (server side) or you will receive a CORS error.

Thanks,  
Tommy

---

<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:** [August 9, 2020, 9:41pm UTC](https://devforum.zoom.us/t/fetching-user-account-info-from-a-react-spa/25517/3 "2020-08-09T21:41:20Z")

</div>

Closed on August 9, 2020, 9:41pm UTC

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