Hello
I think I've found a bug with the Python SDK. Currently, you are using urllib3
for making the requests, which uses the urllib.parse.urlencode
method to encode query params for the URLs. The problem is that the boolean values are encoded as "True" and "False" (capitalized)...
>>> import urllib
>>> params = {'joined': True}
>>> print(urllib.parse.urlencode(params))
joined=True
...and it seems that your API only accepts lowercase booleans.
For example, if I wanted to extract the joined queues for an user, I would make this request:
UsersApi().get_user_queues(user_id=user_id, joined=True)
Which behind the scenes makes a request to
https://api.mypurecloud.ie/api/v2/users/{{user_id}}/queues?joined=True
it returns no entities.
However, if I make this request directly:
https://api.mypurecloud.ie/api/v2/users/{{user_id}}/queues?joined=true
it works properly.
Please, could you check it? Thank you