# Requesting access token responds with a status code of 403

**URL:** <https://devforum.zoom.us/t/requesting-access-token-responds-with-a-status-code-of-403/23935>\
**Category:** API and Webhooks\
**Created:** [July 13, 2020, 1:31am UTC](https://devforum.zoom.us/t/requesting-access-token-responds-with-a-status-code-of-403/23935 "2020-07-13T01:31:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jatongsu2003](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jatongsu2003/32/11811_2.png) [@jatongsu2003](https://devforum.zoom.us/u/jatongsu2003)\
**Post date:** [July 13, 2020, 1:31am UTC](https://devforum.zoom.us/t/requesting-access-token-responds-with-a-status-code-of-403/23935/1 "2020-07-13T01:31:08Z")

</div>

I am following the oauth 2.0 documentation but I am running into a problem where I am unable to make the post request to [https://zoom.us/oauth/token](https://zoom.us/oauth/token). Whenever I access my route, the error message states “Request failed with status code 403.” My code is here:

```
 router.get('/zoom', auth, async (req, res) => {
  if (req.query.code) {
    const url = `https://zoom.us/oauth/token?grant_type=authorization_code&code=${req.query.code}&redirect_uri=${CLIENT_HOME_PAGE_URL}`;
    const headers = {
      'Content-Type': 'application/json',
      Authorization:
        'Basic clientid:clientsecret'
    };
    try {
      const res = await axios.post(url, null, { headers: headers });
      console.log(res);
    } catch (err) {
      console.error(err.message);
      return res.status(500).send('Sever Error');
    }
  }
  res.redirect(
    `https://zoom.us/oauth/authorize?response_type=code&client_id=${ZOOM_CLIENT_ID}&redirect_uri=${ZOOM_REDIRECT_URI}`
  );
});

```

with ZOOM\_REDIRECT\_URI referring to the same route and the clientid:clientsecret in base64string. Where is the error located?

---

<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 15, 2020, 5:18pm UTC](https://devforum.zoom.us/t/requesting-access-token-responds-with-a-status-code-of-403/23935/2 "2020-07-15T17:18:23Z")

</div>

Hey @jatongsu2003,

Your request looks correct. Is there an error message returned from Zoom?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![jatongsu2003](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jatongsu2003/32/11811_2.png) [@jatongsu2003](https://devforum.zoom.us/u/jatongsu2003)\
**Post date:** [July 15, 2020, 5:37pm UTC](https://devforum.zoom.us/t/requesting-access-token-responds-with-a-status-code-of-403/23935/3 "2020-07-15T17:37:41Z")

</div>

Yeah I decided to use request instead of axios and it works now.

---

<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 20, 2020, 5:09pm UTC](https://devforum.zoom.us/t/requesting-access-token-responds-with-a-status-code-of-403/23935/4 "2020-07-20T17:09:34Z")

</div>

Happy to hear you got it working! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 10:46pm UTC](https://devforum.zoom.us/t/requesting-access-token-responds-with-a-status-code-of-403/23935/5 "2020-08-21T22:46:42Z")

</div>

Closed on August 21, 2020, 10:46pm UTC


