# .NET C# TokenOAuth

**URL:** <https://devforum.zoom.us/t/net-c-tokenoauth/15639>\
**Category:** API and Webhooks\
**Created:** [April 30, 2020, 8:00pm UTC](https://devforum.zoom.us/t/net-c-tokenoauth/15639 "2020-04-30T20:00:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbhandari1s](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@pbhandari1s](https://devforum.zoom.us/u/pbhandari1s)\
**Post date:** [April 30, 2020, 8:00pm UTC](https://devforum.zoom.us/t/net-c-tokenoauth/15639/1 "2020-04-30T20:00:20Z")

</div>

I am trying to connect ZOOM Api with one of the custom application I am working on which is based on MVC .NET C#. I am looking into the API documentation and I am little confused about how token works for oAuth. I see we need to update token every hour or so, which is fine, but the process for generating token is what got me confused. For token we need a code and that code is generated by a link. I can test it fine and generate tokens easily from the site but how do you do it from the code.

Documentation suggest calling this for token

```auto
https://zoom.us/oauth/token?grant_type=authorization_code&code=obBEe8ewaL_KdYKjnimT4KPd8KKdQt9FQ&redirect_uri=https://yourapp.com

```

which needs code, can be generated from this page

```auto
https://zoom.us/oauth/authorize?response_type=code&client_id=7lstjK9NTyett_oeXtFiEQ&redirect_uri=https://yourapp.com

```

But if I go through API on code, it will redirect to the url and don’t pass us the code.

Any idea on this?

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

**Which Endpoint/s?**  
OAuth Token

---

<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:** [May 5, 2020, 6:55pm UTC](https://devforum.zoom.us/t/net-c-tokenoauth/15639/2 "2020-05-05T18:55:09Z")

</div>

Hey @pbhandari1s,

If you are not intending to distribute this integration outside of your Zoom account, you can use a [JWT App](https://marketplace.zoom.us/docs/guides/build/jwt-app) and [JWT Tokens](https://marketplace.zoom.us/docs/guides/auth/jwt) to call the Zoom APIs.

If you are intending to distribute the integration, please follow the 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...

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![pbhandari1s](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@pbhandari1s](https://devforum.zoom.us/u/pbhandari1s)\
**Post date:** [May 5, 2020, 7:35pm UTC](https://devforum.zoom.us/t/net-c-tokenoauth/15639/3 "2020-05-05T19:35:32Z")

</div>

I am sorry but the question was different. I already looked into the documentation and was confused about how you get the token to be used in the application. Is there any way you can help other than just referencing to the document which I have already looked at? I would really appreciate any help.

---

<div class="post-metadata">

**Author:** ![michael.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael.zoom/32/37213_2.png) [@michael.zoom](https://devforum.zoom.us/u/michael.zoom)\
**Post date:** [May 8, 2020, 9:44pm UTC](https://devforum.zoom.us/t/net-c-tokenoauth/15639/4 "2020-05-08T21:44:05Z")

</div>

Hi @pbhandari1s, the authorization code you’re looking for is passed to you as a parameter of the redirect URL. Are you not receiving this?

There’s a sample of this process in our [OAuth sample app](https://github.com/zoom/zoom-oauth-sample-app) (although it is Nodejs)

---

<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, 9:07pm UTC](https://devforum.zoom.us/t/net-c-tokenoauth/15639/5 "2020-08-21T21:07:31Z")

</div>


