Petrc Posted February 12, 2018 Share Posted February 12, 2018 Hi, I have an application which is calling the API with the GetTickets action. Its been working fine on 7.2 but since the upgrade to 7.4 the result contains null for the tickets array. Is there anything new required fields I need to include in the request parameters? Link to comment Share on other sites More sharing options...
steven99 Posted February 15, 2018 Share Posted February 15, 2018 Make sure the user you're using has the department you want to get tickets for assigned to the user. It is a security feature to limit data you only want them to get access to. Also check API credentials and roles to ensure they have gettickets as allowed permission. A side note, this only applies to remote calls as localapi returns all results since the script could just use database connections to get it. Link to comment Share on other sites More sharing options...
lsnhost Posted February 15, 2018 Share Posted February 15, 2018 The official GetTickets Developer Documentation does not indicate any changes Link to comment Share on other sites More sharing options...
Petrc Posted February 15, 2018 Author Share Posted February 15, 2018 Thank you Steven, This issue did happen from a remote service. The problem was that the user API role did not have any support departments assigned to it. I added the departments and now its working fine. Hopefully the documentation can be updated to explain these changes. Link to comment Share on other sites More sharing options...
twhiting9275 Posted February 16, 2018 Share Posted February 16, 2018 Well, it sounds like it shouldn't have worked before. No departments assigned, no tickets can be viewed. That's how the system has always worked. Looks like there was a fluke prior to 7.4 that allowed this , which isn't good Link to comment Share on other sites More sharing options...
steven99 Posted February 16, 2018 Share Posted February 16, 2018 It is just signs of WHMCS tightening the API and security, which is good. The gettickets without assigned departments has been around for a while . It makes sense the way the API works now, but perhaps the API role should have which queues you want access to instead of or in addition to the per user setting. Or at least note it some where. Link to comment Share on other sites More sharing options...
Recommended Posts