Get contact list data within python

I am trying to get contact list outbound data, however when I calls 'post_outbound_contactlist_export' API, it returns me a uri, then I have to use browser to open the uri to download a csv file. And I also need to make sure I've logon the 'mypurecloud.com.au' , then it allowed the browser to download the file.

Is there any way to get the data within script? Is it possible to get the contact list data as in Json data format like other APIs?

When you download the file from the returned URL in your script, be sure to pass your auth token in the header (i.e. authorization: Bearer asdf1234) of the GET request.

Thanks Tim,

is it possible to parse the data within the script? I don't really want to use browser to download the csv files and then load the data.

if possible can you show me some sample code of how to do it?

Appreciate for your help!

Python is definitely capable of parsing CSV files; that exercise isn't PureCloud-specific. You can search google for something like "python how to parse csv file" to find lots of tutorials and sample code.

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