Forum Discussion
AustinK
6 years agoQrew Commander
If you have to do it via the URL then follow the guide in the API reference, it gives almost the exact URL you need to use and then you just replace the names and role id inside it with your fields. I think this might work for you but it will probably need the app token or user token added in too. You can hard code the role id or not, I chose not to.
URLRoot() & "db/" & Dbid() &"?a=API_ProvisionUser"&"
&email=" & URLEncode([Email]) &
"&roleid=" & [Role ID] &
"&fname="& URLEncode([First name])&
"&lname=" & URLEncode([Last name])
https://help.quickbase.com/api-guide/provisionuser.html
Have you tried doing this with a webhook? That sounds like exactly what you want. Instead of following the instructions for doing it via the URL follow the instructions for doing it with a webhook with XML. You would want the webhook to trigger when a new record is added and you may also want to add other criteria there if you need to be sure the email is a specific domain or something like that.
You will need to include the first and last name fields as well as their email to do this similar to the example below but with your field names used instead. Also be sure to update your role id in here too so it is the role you want them to be added as.
<qdbapi>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<roleid>11</roleid>
<email>[Email]</email>
<fname>[First name]</fname>
<lname>[Last name]</lname>
</qdbapi>
URLRoot() & "db/" & Dbid() &"?a=API_ProvisionUser"&"
&email=" & URLEncode([Email]) &
"&roleid=" & [Role ID] &
"&fname="& URLEncode([First name])&
"&lname=" & URLEncode([Last name])
https://help.quickbase.com/api-guide/provisionuser.html
Have you tried doing this with a webhook? That sounds like exactly what you want. Instead of following the instructions for doing it via the URL follow the instructions for doing it with a webhook with XML. You would want the webhook to trigger when a new record is added and you may also want to add other criteria there if you need to be sure the email is a specific domain or something like that.
You will need to include the first and last name fields as well as their email to do this similar to the example below but with your field names used instead. Also be sure to update your role id in here too so it is the role you want them to be added as.
<qdbapi>
<ticket>auth_ticket</ticket>
<apptoken>app_token</apptoken>
<roleid>11</roleid>
<email>[Email]</email>
<fname>[First name]</fname>
<lname>[Last name]</lname>
</qdbapi>