有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java OKTA在命中/groups端点时返回400错误

我已经创建了API令牌,并记录了要在应用程序中使用的值。有了这些,我可以在《邮递员》中看到所有的团体细节

[![在此处输入图像描述][1][1] 但同样的情况是,我的java应用程序无法正常工作,出现400个错误

String oktaURL = "https://oktaservername.oktapreview.com/api/v1/groups";
URL url1 = new URL(oktaURL);
httpsClient = (HttpsURLConnection) url1.openConnection();
httpsClient.setRequestMethod("GET");
httpsClient.setRequestProperty("Accept","application/json");    
httpsClient.setRequestProperty("Content-Type","application/json");  
httpsClient.setRequestProperty("Authorization", "SSWS 00-psFd4H7Ag-12XGAG4zj6364T");
httpsClient.setInstanceFollowRedirects(false);

log.info ("Send the GET request");
// Send post request
httpsClient.setDoOutput(true);

请解释一下这个问题


共 (0) 个答案