Getting large data sets with the Zendesk API and Python Follow

Comments

7 comments

  • Avatar
    Viola Rudenko

    Hi Charles,


    Thank you for the great API tutorials! It's super helpful.


    Is there a way to use token for authentication in this setup? I tried to follow the token guidelines here , but it gives me 404 error:


    credentials = 'my_email' + '/token', 'my_api_token'
    session = requests.Session()
    session.auth = credentials


    OR


    user = 'my_email +'/token'
    pwd = 'my_api_key'
    session = requests.Session()
    session.auth = (user, pwd)


    I also tried to set the header like here, but still no luck:


    session = requests.Session()
    head = {'Authorization': 'access_token my_api_token'}
    response = session.get(url, headers=head)


    P.S. I was able to get access to Zendesk data with my email address and token before.

  • Avatar
    Charles Nadeau

    Hi Viola,


    Hmm, I tested the script with a token and it works for me. Example:


    credentials = 'example@outlook.com' + '/token', 'qPbD6eTsXNC4aBIDs4UkHYD3fss6fdfalnZDjmSN'

    Did you check if token access is enabled in your Zendesk? In the agent interface, click Admin (gear icon) in the lower-left, then API in the Channels category. On the Channels/API page, verify that Token Access is enabled (the blue checkbox). If not, make sure to click the Save button after selecting the checkbox.

  • Avatar
    Viola Rudenko

    Hi Charles,


    Thank you for looking into that! The token access was enabled, but looks like I picked incorrect topic_id. As soon as I switched to ticket_metrics, the script executed.

  • Avatar
    Don Wood

    Thanks! this looks very useful. I'm not very technical so excuse my question. Can this work to get all the data on tickets out to a spreadsheet? The reporting in Zendesk is limited and I want to be able to get ticket data our of the system and into a format to build reports. A simple this I would like is to report the ticket and the associated JIRA ticket number. We are using the integration with JIRA but I don't see a way to get this information.

  • Avatar
    Emilio Méndez

    Great topic, not only in content but in form as well; exactly what I was looking for !!  Thank you Charles & Zendesk Team !!

  • Avatar
    Emilio Méndez

    Hi Don:

    Basic reporting might be limited, but you can try "Insights", it's definitely a whole different thing; the only thing is that it depends on the plan you have.

    Hope that works for you !!

    Regards,

  • Avatar
    Charles Nadeau

    Hi Don,

    To learn how to use the API to export lots of data to Excel, see the companion tutorial:

Please sign in to leave a comment.

Powered by Zendesk