Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  DNC List Download

    Posted 06-05-2025 18:31

    Dustin_York | 2024-06-14 13:48:51 UTC | #1

    Hello, I have a script that was working until yesterday morning. It downloads the dnc list after getting the uri. I have to go through a proxy server, but every other api call I have working in multiple different scripts are still working fine through that proxy, except for dowloading the csv for DNC lists and Contact Lists as well. Did anything change on the PureCloud side a couple days ago? I am getting a 403 forbidden error.


    tim.smith | 2024-06-14 13:52:09 UTC | #2

    A 403 generally indicates a permissions issue. Check the response payload for additional details on the error.


    Dustin_York | 2024-06-14 16:52:40 UTC | #3

    /usr/local/lib/python3.6/site-packages/google/auth/crypt/cryptographyrsa.py:22: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release. import cryptography.exceptions Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 700, in urlopen self.prepareproxy(conn) File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in prepareproxy conn.connect() File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 369, in connect self._tunnel() File "/usr/lib64/python3.6/http/client.py", line 929, in _tunnel message.strip())) OSError: Tunnel connection failed: 403 Forbidden

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 450, in send timeout=timeout File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 786, in urlopen method, url, error=e, _pool=self, stacktrace=sys.excinfo()[2] File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api-downloads.usw2.pure.cloud', port=443): Max retries exceeded with url: /dnc-lists/exports/[[[[REDACTED]]]] (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',)))

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/kohls/apps/ai-ops/aiops-ml/rundeck/scripts/purecloud/pcInventory.py", line 401, in <module> pc.main() File "/kohls/apps/ai-ops/aiops-ml/rundeck/scripts/purecloud/pcInventory.py", line 371, in main dncnumbers = self.dncListGet(id) File "/kohls/apps/ai-ops/aiops-ml/rundeck/scripts/purecloud/pcInventory.py", line 333, in dncListGet apiresponse, timeout=15, headers=headers, proxies=self.proxies File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, *kwargs) File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, *kwargs) File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 529, in request resp = self.send(prep, *sendkwargs) File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 667, in send history = [resp for resp in gen] File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 667, in <listcomp> history = [resp for resp in gen] File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 245, in resolveredirects *adapter_kwargs File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 645, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 513, in send raise ProxyError(e, request=request) requests.exceptions.ProxyError: HTTPSConnectionPool(host='api-downloads.usw2.pure.cloud', port=443): Max retries exceeded with url: /dnc-lists/exports/[[[[REDACTED]]]] (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden',))) Result: 1 Failed: NonZeroResultCode: Result code was 1 Execution failed: 855251 in project AIOPS: [Workflow result: , step failures: {1=Dispatch failed on 1 nodes: [aiops-rundeck-c1-prd-1.kohls.com: NonZeroResultCode: Result code was 1 + {dataContext=MultiDataContextImpl(map={ContextView(step:1, node:aiops-rundeck-c1-prd-1.kohls.com)=BaseDataContext{{exec={exitCode=0}}}, ContextView(node:aiops-rundeck-c1-prd-1.kohls.com)=BaseDataContext{{exec={exitCode=0}}}}, base=null)} ]}, Node failures: {aiops-rundeck-c1-prd-1.kohls.com=[NonZeroResultCode: Result code was 1 + {dataContext=MultiDataContextImpl(map={ContextView(step:1, node:aiops-rundeck-c1-prd-1.kohls.com)=BaseDataContext{{exec={exitCode=0}}}, ContextView(node:aiops-rundeck-c1-prd-1.kohls.com)=BaseDataContext{{exec={exitCode=0}}}}, base=null)} ]}, status: failed]


    tim.smith | 2024-06-14 17:04:48 UTC | #4

    @Dustin_York Please contact your company's security team immediately to inform them of a potential data breach of all the phone numbers in that DNC list. I have edited your post to remove the download URL with the embedded auth token in it, but it was exposed publicly on the internet for ~30 mins before I caught it and removed it.

    FWIW this appears to be an error on your side because I was able to successfully download the DNC export from the URL in your post. I have permanently deleted the file from my computer after seeing it completed successfully.

    The error seems to originate from your proxy:

    Dustin_York, post:3, topic:26783
    Caused by ProxyError('Cannot connect to proxy.',

    yuueno | 2024-06-17 00:46:56 UTC | #5

    We encountered the similar problem last week. Genesys Cloud changed firewall requirements.

    June 10, 2024 - Genesys Cloud Resource Center (mypurecloud.com)

    Before this release, download url is such like 'https://xxxxxx.s3.<region>.amazonaws.com/MediaCache/xxxx , but it changed to 'https://api-downlaods.mypurecloud.jp/MediaCache/xxxx' last week. Your proxy may affect this change.


    system | 2024-07-17 00:47:32 UTC | #6

    This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 26783