# Generate Authorization code and token c# code

**URL:** <https://devforum.zoom.us/t/generate-authorization-code-and-token-c-code/39197>\
**Category:** API and Webhooks\
**Created:** [December 26, 2020, 9:19am UTC](https://devforum.zoom.us/t/generate-authorization-code-and-token-c-code/39197 "2020-12-26T09:19:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mnf](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mnf](https://devforum.zoom.us/u/mnf)\
**Post date:** [December 26, 2020, 9:19am UTC](https://devforum.zoom.us/t/generate-authorization-code-and-token-c-code/39197/1 "2020-12-26T09:19:37Z")

</div>

**Description**  
how to generating authorization code & access token before creating meeting?

**Error**  
GET Rest Client return (Zoom OAuth Login page)

**I’m Using OAuth type**  
Knowing the endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.

**Which Endpoint/s?**  
By this URL:  
[https://zoom.us/oauth/authorize?response\_type=code&client\_id={my\_client\_Id}&redirect\_uri=https://zoom.us](https://zoom.us/oauth/authorize?response_type=code&client_id=%7Bmy_client_Id%7D&redirect_uri=https://zoom.us)

I’m developing an [ASP.Net](http://ASP.Net) core web app for creating zoom meeting and join it.  
So, i need to generate an access token before making request to zoom.  
but i’m unable to generate token using my OAuth and client\_Id.  
how to do it using C# http request without showing modal to enter email and password?

Regards.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 28, 2020, 8:24pm UTC](https://devforum.zoom.us/t/generate-authorization-code-and-token-c-code/39197/2 "2020-12-28T20:24:27Z")

</div>

Hi @mnf,

Thanks for reaching out about this. Have you had a chance to look over our OAuth Guide?

> **[OAuth 2.0 - Authorization - Documentation](https://marketplace.zoom.us/docs/guides/auth/oauth)**
>
> 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...

The first step, if you haven’t already, is to [create an OAuth App](https://marketplace.zoom.us/docs/guides/build/oauth-app) to generate your Client ID and Secret. From there, you will then need to follow steps 1 and 2 in our guide: retrieving the `code` from your redirect URL after the user installs the app, and then using that code in step 2 to fetch an access token.

Your second request (after you retrieve the code), should look something like this:

```auto
var client = new RestClient("https://zoom.us/oauth/token?grant_type=authorization_code&code={code}&redirect_uri=https://zoom.us");

client.Timeout = -1;

var request = new RestRequest(Method.POST);

request.AddHeader("Authorization", "Basic <base64encoded_clientId_clientSecret>");

IRestResponse response = client.Execute(request);

Console.WriteLine(response.Content);

```

Let me know if this helps,  
Will

---

<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:** [January 28, 2021, 6:24am UTC](https://devforum.zoom.us/t/generate-authorization-code-and-token-c-code/39197/3 "2021-01-28T06:24:32Z")

</div>

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