API updated?

Answered

13 Comments

  • Jamie Salvatori
    Comment actions Permalink

    We're suddenly having issues as well. Nothing has changed on our end, but the API is no longer creating tickets like it used to.

    0
  • Richard Penman
    Comment actions Permalink

    Zendesk support told me it is a known problem they are working on.

    0
  • Jamie Salvatori
    Comment actions Permalink

    Thanks Richard. In case Zendesk support is reading and wanted confirmation from another customer, please note that I just double-checked the error message and we are also receiving "Couldn't authenticate you". We are using v2 of the API and none of our credentials have changed since this issue began.

    0
  • Richard Penman
    Comment actions Permalink

    Just got an update from support that this problem should be fixed, and login is working for me now.

    0
  • Jamie Salvatori
    Comment actions Permalink

    Glad it's working for you, but I'm still getting the same error. I hope support is following our little thread :).

    0
  • Dan Beirouty
    Comment actions Permalink

    @Richard: Thanks again for your patience today. Glad this is working for you now!

    @Jamie: Sorry for the inconvenience this has caused you today! I've just received your ticket and will talk to you in there.

    0
  • Gary Grossman
    Comment actions Permalink

    Hi all,

    There is now a post from Maxime Prades, Zendesk's Platform Product Manager, explaining the changes:

    https://support.zendesk.com/hc/en-us/articles/204575783--BREAKING-REST-API-Authentication-changes

    Gary

    0
  • Maxime
    Comment actions Permalink

    Hey guys, 

    As Gary said I hope you now have all you need to find where the problem is, apologies for not posting on the breaking changes forum.

    Please make sure you guys are signed up to developer.zendesk.com to receive deprecation notices going forward. 

    Let us know if we can help some more, and again apologies 

    Thanks

    Maxime

    0
  • Brian Ulmer
    Comment actions Permalink

    As of Feb 18, 2015, my production APIs were working.  On the 19th, they starting failing with error message 401 "couldn't authenticate you".

    I used to be able to cut-n-paste the URL into Firefox and obtain the JSON results, but that too was failing.  Upon contacting customer support, I learned that Zendesk did something to prevent the browser from prompting for a userid and password, thus the 401 "authenticate message".  Customer support said to logon to Zendesk and then issue the API call via the browser.  That now works, but my vba code is still failing.

    I then browsed the support site and found that the REST API was changed and that new header information is required.

    My old vba request looked like this:

    xmlHttp.Open "GET", strURL, 0, "{email}/token", "{api token string}"
    xmlHttp.setRequestHeader "Content-Type", "text/xml"
    xmlHttp.send

    The new request looks like this:

    xmlHttp.Open "GET", strURL, 0, "{email}/token", "{api token string}"
    xmlHttp.setRequestHeader "Content-Type", "application/json"
    xmlHttp.setRequestHeader "Accept", "application/json"
    xmlHttp.send

    Can anyone see what I am doing wrong?  As I said earlier in this message, this is a production API and has been working for months.

    Thank you

    0
  • Gary Grossman
    Comment actions Permalink

    Hi Brian,

    Our apologies for the disruption. I see you filed a ticket on support.zendesk.com, we'll get it fixed up for you and discuss there.

    Others running into the problem: You may be able to fix it by changing your xhr in VBA to use a non-browser User-Agent header, such as

    xmlHttp.setRequestHeader "User-Agent", "MyZendeskIntegration/1.0"

    I'm not sure if VBA xhr allows customization of the User-Agent header, but that should fix it if it does.

    ... or submit a request at support.zendesk.com and we can fix this for you on our side.

    Gary Grossman, Zendesk Engineering

    0
  • Brian Ulmer
    Comment actions Permalink

    Gary,

    THANK YOU for the prompt reply.  I added the new request header and the issue is now resolved.

    Again, thank you very much.

    0
  • Wasif Khalid
    Comment actions Permalink

    Hello guys,

    i am not able to call export api through vba code:

    Public Sub Api_Exportt()


    Dim result As String
    Dim XMLHTTP As New MSXML2.XMLHTTP60, strURL As String
    strURL = "https://telenordigital.zendesk.com/api/v2/views/360045281373.json"
    XMLHTTP.Open "GET", strURL, 0, "{email}/token", "{token}"

    XMLHTTP.setRequestHeader "User-Agent", "MyZendeskIntegration/1.0"
    XMLHTTP.setRequestHeader "Content-Type", "application/json"
    XMLHTTP.setRequestHeader "Accept", "application/json"

    XMLHTTP.send
    MsgBox (XMLHTTP.responseText)

    End Sub

     

    It says "coundn't authenticate you" 

    Kindly help

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Wasif. Keep in mind that "{email}/token", and "{token}" need to be replaced and correspond to your own Zendesk account credentials. Something that would look like:

    XMLHTTP.Open "GET", strURL, 0, "myemail@example.com/token", "js2sjuzZMTjs2sjuzZMTjs2sjuzZMTjs2sjuzZMT"

    The API token value is generated inside Zendesk Support. Details on how to generate an API token can be found here: Generating a new API token

    You can also just use your email and password (just get rid of the "/token" part):

    XMLHTTP.Open "GET", strURL, 0, "myemail@example.com", "myPasswordHere"

    Hope this gets you going!

     

    0

Post is closed for comments.

Powered by Zendesk