Skip to main content

data API for agent contact returns 404

  • February 11, 2019
  • 2 replies
  • 142 views

We have a ticket page plugin that uses the contact/data-API function, to determine whether the current ticket's contact an agent or a customer.


https://developers.freshdesk.com/v2/docs/data-api/#contactAPI




Since last week (~2019-02-06) this method call returns a 404 instead of a contact object.

Previously we used the result to get the flag result.contact.is_agent


Was this changed, or is there an alternative? I didn't find any documentation about possible error codes.


c.data.get("contact").then(r => console.log("Is agent? ->", r.contact.is_agent))   

c.data.get("contact")
     .then(
          r => console.log("Is agent? ->", r.contact.is_agent), 
          e => console.log(e));
    

 

Here an example of the error logs in the console in case the requester was an agent. 

c.data.get("contact").then(r => console.log("Is agent? ->", r.contact.is_agent), e => console.log(e));
Promise {<pending>}
new-relic-10cd82f5c7…86e1796fcf7927.js:1 GET https://potix.freshdesk.com/api/_/contacts/5000493461?include=company 404
vendor-10cd82f5c7e2e…6e1796fcf7927.js:77 
i {isAdapterError: true, description: undefined, fileName: undefined, lineNumber: undefined, message: "Ember Data Request GET /api/_/contacts/5000493461 returned a 404↵Payload (Empty Content-Type)↵ ", …}
vendor-10cd82f5c7e2e…6e1796fcf7927.js:77 
i {isAdapterError: true, description: undefined, fileName: undefined, lineNumber: undefined, message: "Ember Data Request GET /api/_/contacts/5000493461 returned a 404↵Payload (Empty Content-Type)↵ ", …}
VM1004:1 
{message: "Request timed out!"}

 

In the end the error message simply says "... Timed out!" ... which looks like a bug to me. As mentioned above this used to work before the update last week.



Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

  • Community Debut
  • 1 reply
  • February 12, 2019

I'm getting the same error. The actual c.data.get('contact') API returns 404


We also see 404 for contac API requests. I hope this gets fixed soon.