Legacy Dev Forum Posts

 View Only

Sign Up

Getting errors when trying to get contacts from contact list using export

  • 1.  Getting errors when trying to get contacts from contact list using export

    Posted 06-05-2025 18:16

    anona | 2019-10-24 09:15:44 UTC | #1

    Using this API resource: https://developer.mypurecloud.com/api/rest/v2/outbound/#get-api-v2-outbound-contactlists--contactListId--export

    When accessing the link returned in the response:

    ! python import requests headers = { 'Authorization': 'bearer MYTOKEN', 'Content-Type': 'text/plain; charset=UTF-8' } requests.get(URLRETURNEDINRESPONSE, headers=headers)

    I am getting the following error after some amount of successful requests:

    File "/usr/lib/python3.7/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, *kwargs) File "/usr/lib/python3.7/site-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, *kwargs) File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, *sendkwargs) File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 668, in send history = [resp for resp in gen] if allowredirects else [] File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 668, in <listcomp> history = [resp for resp in gen] if allowredirects else [] File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 247, in resolveredirects *adapterkwargs File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3.7/site-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='prod-apse2-dialer.s3.ap-southeast-2.amazonaws.com', port=443): Max retries exceeded with url: /contact-lists/exports/CONTACTLISTID-3595%20-%20Alibaba%20-%2011-10-19.csv?response-content-disposition=attachment%3Bfilename%3D%22CONTACTLISTID-3595%20-%20Alibaba%20-%2011-10-19.csv%22&X-Amz-Security-Token=TOKEN&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20191022T224935Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Credential=CREDENTIALPREFIX3MPOT%2F20191022%2Fap-southeast-2%2Fs3%2Faws4request&X-Amz-Signature=SIGNATURE (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f494d5be3d0>: Failed to establish a new connection: [Errno -3] Try again'))

    Does anyone know what could be wrong?


    tim.smith | 2019-10-24 14:45:17 UTC | #2

    I did a google search for that error and Errno -3 appears to mean that your app was unable to resolve the domain name via DNS. This may be a problem with the computer that's running this app or your network in general if it's not able to resolve prod-apse2-dialer.s3.ap-southeast-2.amazonaws.com. I just tested and I'm able to resolve this domain successfully.

    When you get this message, try again and check with your network team to see if they can help trace the failure. AWS did have a minor temporary DNS issue yesterday, but I believe it was contained within the AWS network itself and shouldn't have manifested itself externally. However, if the issue persists and doesn't appear to be on your end, please open a case with PureCloud Care to investigate further as that will require sharing information that's not appropriate for a public forum.


    system | 2019-11-24 14:45:17 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: 6338