meet error Non-global clients are not allowed access to APIv1 when trying to get access token

I’m trying to get access token with following code snippet, which is workable one year ago.
But it failed with error "Non-global clients are not allowed access to APIv1", what does “Non-global clients” mean and how to workaround it.

JSONObject jsonObject = new JSONObject();
jsonObject.put("client_id", "Qztgs5JefLiBKwu3jzfnRTG8uqyZUoel");
jsonObject.put("client_secret", "***************************");
jsonObject.put("grant_type", "client_credentials");
HttpPost post = new HttpPost("https://lcheng.auth0.com/oauth/token");	    							
post.setEntity(new StringEntity(jsonObject.toString(), ContentType.APPLICATION_JSON));
CloseableHttpResponse response = httpClient.execute(post); 
System.out.println(response.getStatusLine());
String result = EntityUtils.toString(response.getEntity(), ContentType.getOrDefault(response.getEntity()).getCharset());
System.out.println("reuslt=" + result);

+1 got this too

I got this error when I only sent client id and secret but didn’t send audience/domain

2 Likes

Having the same issue. Did you solve it?

Any update on this? I’m having the same issue