Has anyone successfully updated a group using the API?

Background first... we have a pool of agents that is constantly changing from week to week.  We have to remove agents to and from the group as they come and go from this rotating role.  It's a carry-over from a previous system we used in support.  As it is now, a Freshdesk administrator must remove an agent and add a new agent as people come on and off based on a schedule.  Sometimes they even agree to cover another during travel when on schedule, etc. and this requires the same remove/add to the group situation.


So, I figured I'd create a "self service" web app that uses the API calls to update the group membership.  I created it using PHP.


I can do everything I have wanted to do so far including pulling present group members for display and pulling agents for populating drop downs, etc.  But, when I finally got to sending the PUT to update the agent_list I can't get it to work.  


There are no specific PHP examples but I was sure my code flushes out.  I compared it to some c# and Ruby code in the examples that updated the group and it is functionally correct.


So then I figured I'd verify it using curl as demonstrated in this api documentation.  This results in an HTML status and an HTML error page being returned.  The error page states "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly."


I'm starting to wonder if the Group Update API function is even working correctly.  So, my question is, has anyone ever seen it work and/or has it presently working for them?


Provencio,


A sample PHP code has been added here to update a group via API


Hope this helps you to get started.

I appreciate that and it will probably help folks in the future too.  My issue turned out to be that I wasn't accounting for SSL.  It's always the easy/obvious that doesn't appear so easy/obvious until you take a step back.


Thanks!

Login or Signup to post a comment