# OAuth App with generate token

**URL:** <https://devforum.zoom.us/t/oauth-app-with-generate-token/38288>\
**Category:** API and Webhooks\
**Created:** [December 13, 2020, 5:15pm UTC](https://devforum.zoom.us/t/oauth-app-with-generate-token/38288 "2020-12-13T17:15:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sikhaooapp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sikhaooapp/32/20099_2.png) [@sikhaooapp](https://devforum.zoom.us/u/sikhaooapp)\
**Post date:** [December 13, 2020, 5:15pm UTC](https://devforum.zoom.us/t/oauth-app-with-generate-token/38288/1 "2020-12-13T17:15:58Z")

</div>

Hello everyone,  
I’m not able to generate a token for use resource by zoom API.  
I have a some information related to zoom API access. I want to code to generate or refresh token by java. I have short time to integrate zoom with my web app.  
1.OAuth app (Sikhaoo-Live-Class)  
2. Client Id  
3. Client Secret  
4. Redirect url ([http://enggheads.in/enggheads-web-v18/outsider/hello](http://enggheads.in/enggheads-web-v18/outsider/hello))

---

<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 14, 2020, 9:01pm UTC](https://devforum.zoom.us/t/oauth-app-with-generate-token/38288/2 "2020-12-14T21:01:20Z")

</div>

Hi @sikhaooapp,

Please see our OAuth guide here for the steps necessary to generate an OAuth token or refresh one:

> **[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...

While we don’t have a sample in java, let us know what errors or issue you’re running into and we’re happy to help.

Best,  
Will

---

<div class="post-metadata">

**Author:** ![sikhaooapp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sikhaooapp/32/20099_2.png) [@sikhaooapp](https://devforum.zoom.us/u/sikhaooapp)\
**Post date:** [December 15, 2020, 8:28am UTC](https://devforum.zoom.us/t/oauth-app-with-generate-token/38288/3 "2020-12-15T08:28:10Z")

</div>

I’m able to generate token with chrome or postman and Callback URL working fine. When i’m hit same URL with the help of java code then Callback URL not working properly and return a unknown zoom web page so help me

GET\_URL = " [https://zoom.us/oauth/authorize?response\_type=code&client\_id=7lstjK9NTyett\_oeXtFiEQ&redirect\_uri=https://yourapp.com](https://zoom.us/oauth/authorize?response_type=code&client_id=7lstjK9NTyett_oeXtFiEQ&redirect_uri=https://yourapp.com)"

```
private static void sendGET() throws IOException {
	URL obj = new URL(GET_URL);
	HttpURLConnection con = (HttpURLConnection) obj.openConnection();
	con.setRequestMethod("GET");
	con.setRequestProperty("User-Agent", USER_AGENT);
	int responseCode = con.getResponseCode();
	System.out.println("GET Response Code :: " + responseCode);
	if (responseCode == HttpURLConnection.HTTP_OK) { // success
		BufferedReader in = new BufferedReader(new InputStreamReader(
				con.getInputStream()));
		String inputLine;
		StringBuffer response = new StringBuffer();

		while ((inputLine = in.readLine()) != null) {
			response.append(inputLine);
		}
		in.close();

		// print result (Return unkonwn zoom web page)
		System.out.println(response.toString());
	} else {
		System.out.println("GET request not worked");
	}

}

```

web page text  
**We’re sorry but oauth-login doesn’t work properly without JavaScript enabled. Please enable it to continue.**

---

<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 16, 2020, 6:53pm UTC](https://devforum.zoom.us/t/oauth-app-with-generate-token/38288/4 "2020-12-16T18:53:10Z")

</div>

Hi @sikhaooapp,

Thanks for sharing the error you’re running into. Can you ensure that JavaScript is enabled on your browser? To enable JavaScript in Chrome:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/2/428aeeb844e4c0ba25900f2b1971ff86c06752f6.png)

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![sikhaooapp](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sikhaooapp/32/20099_2.png) [@sikhaooapp](https://devforum.zoom.us/u/sikhaooapp)\
**Post date:** [December 17, 2020, 10:47am UTC](https://devforum.zoom.us/t/oauth-app-with-generate-token/38288/5 "2020-12-17T10:47:15Z")

</div>

I want to integrate Zoom api on server side. And i’m hit zoom URL from server side on Apache Tomcat to generate token. Than how can i enable javascript on tomcat server  
.

---

<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 18, 2020, 5:01pm UTC](https://devforum.zoom.us/t/oauth-app-with-generate-token/38288/6 "2020-12-18T17:01:28Z")

</div>

Hi @sikhaooapp,

Ah I see, thank you for clarifying that you’re running into this error on your server.

It sounds like this might be an issue with your server configuration. Can you ensure that you have CORS policies allowed? While this is a thread for vue.js, it sounds like you could be running into a similar issue:

> <https://github.com/vuejs/vue-cli/issues/5470>
>
> Version
> 4.3.1
> Environment info
> We're sorry but work doesn't work properly without JavaScript enabled. Please enable it to continue.
> Steps to reproduce
> I created a VueJS...

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 18, 2021, 3:01am UTC](https://devforum.zoom.us/t/oauth-app-with-generate-token/38288/7 "2021-01-18T03:01:34Z")

</div>

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