Skip to main content
Question

Has any one created a Webhook using API_ChangeUserRole?

  • Jul 26, 2019 6:35 PM UTC
  • 1 reply
  • 39 views

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?
This topic has been closed for replies.

1 reply

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>