Forum Discussion

JasonJohnson2's avatar
JasonJohnson2
Qrew Cadet
6 years ago

Has any one created a Webhook using API_ChangeUserRole?

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?
  • 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>