# Fail to get token

**URL:** <https://devforum.zoom.us/t/fail-to-get-token/25212>\
**Category:** API and Webhooks\
**Created:** [July 26, 2020, 6:26am UTC](https://devforum.zoom.us/t/fail-to-get-token/25212 "2020-07-26T06:26:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rami.heled](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@rami.heled](https://devforum.zoom.us/u/rami.heled)\
**Post date:** [July 26, 2020, 6:26am UTC](https://devforum.zoom.us/t/fail-to-get-token/25212/1 "2020-07-26T06:26:17Z")

</div>

**Description**  
hi, im using c# to get authenticated. getting empty response.  
need some help to figure why .

url =@“[https://zoom.us/oauth/authorize?response\_type=code&client\_id=myclientidfortest&redirect\_uri=https%3A%2F%2Fyourapp.com](https://zoom.us/oauth/authorize?response_type=code&client_id=myclientidfortest&redirect_uri=https%3A%2F%2Fyourapp.com)”;

```
            ServicePointManager.Expect100Continue =true;
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
                | SecurityProtocolType.Tls12
                | SecurityProtocolType.Tls11
                | SecurityProtocolType.Tls;

            ServicePointManager.ServerCertificateValidationCallback =delegate {returntrue; };
            var request = (HttpWebRequest)WebRequest.Create(url);

            request.ContentType ="application /json";
            request.Method ="POST";
            request.Timeout = Timeout.Infinite;
            request.KeepAlive =true;

            request.AllowAutoRedirect =false;
            request.ReadWriteTimeout = 30000;
            request.PreAuthenticate =true;
            request.Credentials = CredentialCache.DefaultCredentials;

            request.Accept ="application/json";
            
            using (var streamWriter =new StreamWriter(request.GetRequestStream(), System.Text.Encoding.ASCII))
            {
               string json =new JavaScriptSerializer().Serialize(new
                {
                    authorization ="Basic mysecretfortest"
                });
                streamWriter.Write(json);
            }
           string Expiration =string.Empty;

           var responsessss = (HttpWebResponse)request.GetResponse();
           using (var streamReader = new StreamReader(responsessss.GetResponseStream()))
            {
               var result = streamReader.ReadToEnd();
               var jss =new JavaScriptSerializer();

```

**Error**  
empty response

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
OAuth

**Which Endpoint/s?**  
Knowing the API endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.

---

<div class="post-metadata">

**Author:** ![rami.heled](https://avatars.discourse-cdn.com/v4/letter/r/eb8c5e/32.png) [@rami.heled](https://devforum.zoom.us/u/rami.heled)\
**Post date:** [July 28, 2020, 7:05am UTC](https://devforum.zoom.us/t/fail-to-get-token/25212/3 "2020-07-28T07:05:55Z")

</div>

can some help? im stuck with this

---

<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, 7:02pm UTC](https://devforum.zoom.us/t/fail-to-get-token/25212/4 "2020-07-30T19:02:11Z")

</div>

Hey @rami.heled,

The authorize url is intended to be viewed in the browser, don’t make an API request to it.

Checkout the guide here:

> **[OAuth 2.0 - Authorization - Documentation](https://marketplace.zoom.us/docs/guides/auth/oauth#step-1-request-user-authorization)**
>
> OAuth with Zoom
> 
> The Zoom API uses OAuth 2.0 to authenticate and authorize users to make requests. To setup access credentials and request scopes for yo...

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 6, 2020, 7:02pm UTC](https://devforum.zoom.us/t/fail-to-get-token/25212/5 "2020-08-06T19:02:11Z")

</div>

Closed on August 6, 2020, 7:02pm UTC

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