Generate Authorization code and token c# code

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

I’m developing an 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.

Hi @mnf,

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

The first step, if you haven’t already, is to create an 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:

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