Discussions

 View Only
  • 1.  Has any one created a Webhook using API_ChangeUserRole?

    Posted 07-26-2019 14:35
    I am working on a seemingly simple (or so I thought) webhook to change the user role using the API_ChangeUserRole. below is part of the XML
    <userid>%curuser%</userid>
    <roleid>12</roleid>
    <newRoleid/>16
    </qdbapi>

    The API guide says I have to have the old roleid and then says it isn't required to have the newroleid. The syntax given is <newRoleid/> and no clue where to put the new id at. I am using a simple checkbox trigger and in true webhook fashion I amgetting no errors.

    Any thoughts on this, anyone?


  • 2.  RE: Has any one created a Webhook using API_ChangeUserRole?

    Posted 08-01-2019 21:21
    It's just poor documentation IMO. While new role ID is an optional parameter, its probably the most critical for a majority of the use cases for this API call! You almost got it, you just need to make an opening for the node for new role id:

    ....
    <roleid>12</roleid>
    <newRoleid>16</newRoleid>
    </qdbapi>