Forum Discussion
SouheilKaram
13 years agoQrew Trainee
Hello Jon,
You probably prefer the code. I will make time to write it if this explanation does not work for you. I will assume that the user has never been registered in your quickbase application:
Once you have the user last name, first name, email address then you may go thru the following:
You must have Basic Access (able to view/add/modify records, depending on permissions)
1 - Invoke API_GetRoleInfo api to get your available roles, You will get back
2 - Get the role_id from the response
3 - Get the dbid for the application that you want the user to have access to.
4 - Provision the user by calling the API_ProvisionUser with the parameters below on the above dbid
You probably prefer the code. I will make time to write it if this explanation does not work for you. I will assume that the user has never been registered in your quickbase application:
Once you have the user last name, first name, email address then you may go thru the following:
You must have Basic Access (able to view/add/modify records, depending on permissions)
1 - Invoke API_GetRoleInfo api to get your available roles, You will get back
An aggregate containing one or more roles, structured as follows:Each role returned has a role ID as an attribute and contains a role name and the application access level that is conferred by the role.
<roles>
<role id="11">
<name>Participant</name>
<access id="3">Basic Access</access>
</role>
</roles
2 - Get the role_id from the response
3 - Get the dbid for the application that you want the user to have access to.
4 - Provision the user by calling the API_ProvisionUser with the parameters below on the above dbid
<qdbapi>
<ticket>2_bdh78chd4_dpsx_b_dnbypa8d372j5rb6vt6kfdx7ty25</ticket>
<apptoken>dtmd897bfsw85bb6bneceb6wnze3</apptoken>
<roleid>11</roleid>
<email>sanskor@sbcglobal.com</email>
<fname>Margi</fname>
<lname>Rita</lname> </qdbapi>
if success the api will return the user_id as follows:
<qdbapi>5 - Now, use API_SendInvitation using the return user_id from provision user api
<action>api_provisionuser</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<userid>112248.5nzg</userid>
</qdbapi>
<qdbapi>6 - If success - Voila!!!
<ticket>2_bdh78chd4_dpsx_b_dnbypa8d372j5rb6vt6kfdx7ty25</ticket>
<apptoken>dtmd897bfsw85bb6bneceb6wnze3</apptoken>
<userid>112249.ctdg</userid>
<usertext>Welcome!</usertext> </qdbapi>
<qdbapi>
<action>API_SendInvitation</action>
<errcode>0</errcode>
<errtext>No error</errtext>
</qdbapi>