user registration requests

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
I would like to develop an alternative user registration system whereby an external user requests to join an app.  The idea is as follows:


We have a custom developed mobile app.  After the app has been downloaded, a person would request to register as a user.  The mobile app is linked to a single quickbase app through the API.

Currently we have to create the user and send them a link where they would register and then create username/password and then enter those details, but I would like it to be the other way around.  

Users can register, it then comes to us as a request and we then approve the user to be loaded on the quickbase app.

I see a lot of complications here, but I have the following idea:


  1. The mobile app, when downloaded is automatically logged into quickbase on a demo user (this will allow API calls to be made to the database)
  2. The user will then go through a registration request page (on the mobile app).  Once completed, the data (Name,e-mail, user etc) will be added to a different table in the quickbase app called (pending user registrations).
  3. We as admins can then approve/deny the request.
  4. On Approval we can automatically create a new user in quickbase with the supplied details.  
  5. The person will then receive the normal link that quickbase automatically sends to e-mail
  6. He will then register his password normally.
  7. He can then login to his new account on our app.

So point 1-3 is a workaround to get the applicants details
Point 4 is the unknown here (can this be done)
point 5-7 is the standard quickbase registration


Apologies if i am not making sense here, but I did try explain as best as possible.
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,522 Points 20k badge 2x thumb
I think you would need to use these two API methods although I am not sure how to partition the overall task between your application and from within QuickBase itself:

https://help.quickbase.com/api-guide/index.html#provisionuser.html
https://help.quickbase.com/api-guide/index.html#sendinvitation.html
Photo of Geoffrey

Geoffrey

  • 1,730 Points 1k badge 2x thumb
Ok great, thanks for this Dan.  A few questions:


1. Would I need to use the AddUserToRole API command as well? 
2. Is it possible to combine all of these API commands in a single button within quickbase so that


a) The user is created
b) The user is added to a role
c) Invitation is sent

I wouldnt have a clue on how to structure this bit of code in a button

Thanks
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,522 Points 20k badge 2x thumb
When you provision the user you can specify the roleid.

So if you app lands the requested user info in a table with these fields:

[email]
[fname]
[lname]

after human review of the request and after button click you can call API_ProvisionUser with these parameters an and the roleid parameter.

This will return a userid. With the userid in hand the script can then send an invitation using API_SendInvitation and including userid, usertext (the invite message) parameters..

There are probably other issues to deal but that is the guts of it.


(Edited)