# 400 ERR\_BAD\_REQUEST while trying to get access token

**URL:** <https://devforum.zoom.us/t/400-err-bad-request-while-trying-to-get-access-token/85124>\
**Category:** Authentication\
**Tags:** api\
**Created:** [March 22, 2023, 5:54am UTC](https://devforum.zoom.us/t/400-err-bad-request-while-trying-to-get-access-token/85124 "2023-03-22T05:54:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadek.hkm](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sadek.hkm/32/46292_2.png) [@sadek.hkm](https://devforum.zoom.us/u/sadek.hkm)\
**Post date:** [March 22, 2023, 5:54am UTC](https://devforum.zoom.us/t/400-err-bad-request-while-trying-to-get-access-token/85124/1 "2023-03-22T05:54:23Z")

</div>

Hi there, I am planning to create an SDK for our customers. We are a saas company and allowing users to create meeting, webnairs etc and let their users signup in their sites and with the help of web sdk, we will show the meeting in their own website instead in zoom’s website. I created an app in developer account for sdk. I used the client id and secrete id to generate `code` but i am not able to get the access key from the code. Here is my request…

```auto
const config = {
      method: "POST",
      url: "https://zoom.us/oauth/token",
      headers: {
        Host: "zoom.us",
        "Content-Type": "application/x-www-form-urlencoded",
        Authorization: "Basic" + Buffer.from(
            `CLINET_ID:SECRETE_ID`
          ).toString("base64"),
      },
      body: {
        code: code,
        grant_type: "authorization_code",
        redirect_uri: `${baseUrl}teacher/payment-gateways/zoom-oauth-callback`,
      },
    };
    try {
      const req = await axios(config);
      return req
    } catch (error) { 
        return error
    }

```

I am getting 400 bad request. Thank you.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 23, 2023, 1:05am UTC](https://devforum.zoom.us/t/400-err-bad-request-while-trying-to-get-access-token/85124/2 "2023-03-23T01:05:56Z")

</div>

Hi @sadek.hkm ,

Please try using our Postman workspace and seeing if you are successful. This can help isolate the issue: [Postman](https://www.postman.com/zoom-developer/workspace/zoom-public-workspace/request/22097587-82698a23-7af5-4f3f-bf2e-a62c3eb8903d)

---

<div class="post-metadata">

**Author:** ![rachelgomez161999](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rachelgomez161999/32/35985_2.png) [@rachelgomez161999](https://devforum.zoom.us/u/rachelgomez161999)\
**Post date:** [March 27, 2023, 7:21am UTC](https://devforum.zoom.us/t/400-err-bad-request-while-trying-to-get-access-token/85124/4 "2023-03-27T07:21:17Z")

</div>

Methods to fix-

Check for Errors in the Address. First, you’ll want to check your URL for any errors.  
Clear Your Browser’s Cache and Cookies.  
Disable Browser Extensions.  
Flush the DNS Cache.  
Check the Uploaded File Size.  
Troubleshoot Your Device and Internet Connection.

Regards,  
Rachel Gomez
