mkoya | 2021-08-04 02:46:15 UTC | #1
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()); } }
anon11147534 | 2021-08-12 05:03:17 UTC | #2
Hi,
A 403 means you have successfully authenticated but don't have the permissions to request a resource.
The API documentation for GET /api/v2/users/{userId}/queues shows that the following permissions are required:
routing:queue:view
routing:queue:join
routing:queueMember:manage
You will need to ask an admin in your Genesys Cloud organization to add the above permissions to your OAuth Client.
system | 2021-09-04 08:40:09 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 11655