A previous solution to a similar issue addresses the known issue (no proxy support)
For my client, they require authentication via proxy as well and the above topic will not resolve this.
Refer to documentation as at time of writing here: https://developer.mypurecloud.com/api/rest/client-libraries/python/
Connect to a Proxy Server If connecting to a proxy server, set the the address of your proxy server as follows: PureCloudPlatformClientV2.configuration.proxy = 'YOUR_PROXY_URL'
If proxy is provided in standard format such as http://user:pass@proxy:port then the following replacement in rest.py may assist. It is what I have done to solve my issue.
import re
....
# https pool manager
if proxy:
proxy_parts=re.search('^([^\/]+\/\/)(?:(.*)@)?(.*)',proxy)
proxy_url=proxy_parts.group(1)+proxy_parts.group(3)
auth_part=proxy_parts.group(2)
if auth_part != None:
proxy_headers = urllib3.util.make_headers(proxy_basic_auth=auth_part)
else:
proxy_headers=None
self.pool_manager = urllib3.ProxyManager(proxy_url,
num_pools=pools_size,
cert_reqs=cert_reqs,
ca_certs=ca_certs,
cert_file=cert_file,
key_file=key_file,
proxy_headers=proxy_headers
)
else:
self.pool_manager = urllib3.PoolManager(
num_pools=pools_size,
cert_reqs=cert_reqs,
ca_certs=ca_certs,
cert_file=cert_file,
key_file=key_file
)
The important parts here are to ensure proxy_url is just a url with no user:pass component and to specify a valid proxy_headers parameter for ProxyManager to use.