Hi,
I am not able to expand 'presence' and 'routingStatus' when using the SDK, I can use one or the other, but not both. However, this works when using the API Explorer.
When using the API Explorer the query strings are structured as follows:
api/v2/routing/queues/{QUEUE_ID}/users?expand=presence%2CroutingStatus (comma-separated)
While the SDK uses this format:
/api/v2/routing/queues/{QUEUE_ID}/users?expand=presence&expand=routingStatus
This is the code I tested with:
const pureCloudPlatform = require("purecloud-platform-client-v2");
const { CLIENT_ID, CLIENT_SECRET, QUEUE_ID } = process.env;
const getUsers = async () => {
const client = pureCloudPlatform.ApiClient.instance;
client.setEnvironment("mypurecloud.ie");
client.setDebugLog(console.log);
client.setReturnExtendedResponses(true);
await client.loginClientCredentialsGrant(CLIENT_ID, CLIENT_SECRET);
const routingApi = new pureCloudPlatform.RoutingApi();
const queueMembersResponse = await routingApi.getRoutingQueueUsers(QUEUE_ID, {
expand: ["presence", "routingStatus"]
});
};
getUsers();
This works fine when using the UsersApi:
const usersResponse = await usersApi.getUsers({
expand: ["presence", "routingStatus"]
});