API_AddUserToRole

Overview

Use API_AddUserToRole to assign a user to a role in your Quick Base application.

You assign a user to a role using API_AddUserToRole. After you assign the role, you can use API_SendInvitation to invite the user to the application.

You can invoke this call on a single user several times, applying a different role each time, if you want give the user more than one role. Giving a user more than one role allows the user to sign in to the same Quick Base application with different roles. (Note that if you try to assign a role the user already has, you'll see an error message.)

Quick Base supplies standard default roles for each application: viewer, participant, and administrator. You can change these and even create custom roles for your applications. You can find out which roles are being used for a particular application using the API_GetRoleInfo call.

Note: You can also assign roles to users when you provision users. See API_ProvisionUser for more information.

To assign roles to users using the Quick Base API or UI, you must have either Basic Access with Sharing access or Full Administration access to the application. Note that, if you have Basic Access with Sharing permissions, you cannot add a user to a role that has Full Administration permissions.

top

Request parameters

Parameter Value Required?

userid

The userid of the user to be added to the access role.

yes

roleid

The ID of the access role being assigned to the user.

yes

ticket

A valid authentication ticket. The authentication ticket is returned via the API_Authenticate call.

yes, one of:

  • ticket
  • username/password
  • user token

usertoken

The user token is an alternative means of authentication, used for API access. User tokens cannot be used to access the Quick Base UI.

yes, one of:

  • ticket
  • username/password
  • user token

apptoken

Supply a valid application token.

yes, if the application requires application tokens

udata

A string value that you want returned. It will not be handled by Quick Base but it will be returned in the response.

no

top

Response values

The response to this call contains the following:

Element Name Value

action

Echoes the originating request, for example, API_AddField.

errcode

If successful, this will be 0. If there is a failure, there will be a code returned here. See Appendix A for a list of codes.

errtext

If successful, this will be "no error". If there is a failure this contains more detail on the nature of the failure.

udata

Optional. Contains any udata value supplied in the request.

top

Sample XML Request

POST https://target_domain/db/target_dbid?
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION:API_AddUserToRole

<qdbapi>
   <ticket>auth_ticket</ticket>
   <apptoken>app_token</apptoken>
   <userid>112245.efy7</userid>
   <roleid>10</roleid>
   <udata>whatever</udata> <!--optional pass-thru data -->
</qdbapi>

top

URL alternative

https://target_domain/db/target_dbid?a=API_AddUserToRole&userid=112245.
efy7&roleid=10&ticket=auth_ticket&apptoken=app_token

where target_domain is the domain against which you are invoking this call, for example, intuit.quickbase.com. Read about this notation.

top

Sample response

<?xml version="1.0" ?>
<qdbapi>
   <action>API_AddUserToRole</action>
   <errcode>0</errcode>
   <errtext>No error</errtext>
   <udata>whatever</udata>
</qdbapi>

 

Go back    |     |  

© 1999-2017 QuickBase, Inc. All rights reserved. Legal Notices.