Hi,
I made below Java code for get a queueId. however getUserQueues() is return 403.
Body: {"message":"You are not authorized to perform the requested action.","code":"not.authorized","status":403}
Auth process should be success. What more do you need?
apiClient = ApiClient.Builder.standard()
.withBasePath(region)
.withRetryConfiguration(retryConfiguration)
.withLoggingConfiguration(loggingConfiguration)
.withShouldRefreshAccessToken(true)
.build();
ApiResponse<AuthResponse> authResponse = apiClient.authorizeClientCredentials(clientId, clientSecret);
System.out.println("authResponse body: " + authResponse.getBody().toString());
Configuration.setDefaultApiClient(apiClient);
UsersApi usersApi = new UsersApi();
UserEntityListing response = usersApi.getUsers(null, null, null, null, null, null, null, null);
List<User> users = response.getEntities();
for (User user : users) {
UserQueueEntityListing userQueues = usersApi.getUserQueues(user.getId(), null, null, null, null);
System.out.println(userQueues);
for (UserQueue userQueue : userQueues.getEntities()){
System.out.println("queueId:" + userQueue.getId());
}
}