Don't forget to check out our JSON RESTful APIs, they can help you utilize and extend Quickbase with ease.
Overview
Use API_GetUserInfo to get the username and user ID associated with an email address used for Quickbase sign in. You invoke this call on db/main. You can use this call to grant a user access rights to your application and then invite that user to your application. This call is typically made to return the Quickbase user ID for a user whose email address you know, in preparation for subsequent calls to API_AddUserToRole (grant access rights) and API_SendInvitation, both of which require the user ID.
The user email that you specify must be recognized in Quickbase. (For users who aren’t registered in Quickbase yet, use the alternative call API_ProvisionUser.)
For anonymous users, this call returns:
<user id="1.ckbs">
<firstName></firstName>
<lastName></lastName>
<login>anonymous</login>
<email></email>
<screenName>anonymous</screenName>
<isVerified>0</isVerified>
<externalAuth>0</externalAuth>
</user>
If the anonymous user passes in an email parameter, the email will be passed back in the response.
If you don’t supply an email parameter, the ticket parameter will be used to determine the current user, which means the current user ID, name, and email are returned.
Request parameters
Parameter | Value | Required? |
---|---|---|
ticket |
A valid authentication ticket. The authentication ticket is returned via the API_Authenticate call. |
yes |
usertoken |
The user token is an alternative means of authentication, used for API access. User tokens cannot be used to access the Quickbase UI. |
yes, one of:
|
apptoken |
A valid application token |
yes, if the application requires application tokens |
|
Supply the email address (as registered with Quickbase) of the user whose information you want. You can also supply the user’s user name. If you don’t supply this parameter, the call returns the user info of the user to whom the ticket was issued (you). For anonymous users, the email parameter is ignored. |
no |
udata |
A string value that you want returned. It will not be handled by Quickbase but it will be returned in the response. |
no |
Response values
Element Name | Value |
---|---|
action |
Echoes the originating request, for example, API_AddField. |
errcode |
Identifies the error code, if any. (See the Error Codes appendix for a list of possible error codes.) 0 indicates that no error was encountered. |
errtext |
Text that explains the error code. "No error" indicates that no error was encountered. |
ticket |
The ticket needed for application access. |
user |
The returned user aggregate. This aggregate always contains the user ID attribute and the user name. The user aggregate also contains the user login if the email parameter was NOT specified in the request. The login will be any of the following:
The aggregate is structured as follows:
|
udata |
Optional. Contains any udata value supplied in the request. |
Sample XML Request
POST https://target_domain/db/main
HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_GetUserInfo
<qdbapi>
<ticket>auth_ticket</ticket>
<email>Ragnar-Lodbrok@paris.net</email>
<udata>optional data</udata>
</qdbapi>
URL alternative
https://target_domain/db/main?a=API_GetUserInfo&ticket=auth_ticket
&email=Ragnar-Lodbrok@paris.net
where target_domain is the domain against which you are invoking this call, for example, quickbase.com. Read about this notation.
Sample response
<?xml version="1.0" ?>
<qdbapi>
<action>api_getuserinfo</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<user id="112149.bhsv">
<firstName>Ragnar</firstName>
<lastName>Lodbrok</lastName>
<login>Ragnar</login>
<email>Ragnar-Lodbrok@paris.net</email>
<screenName>Ragnar</screenName>
</user>
</qdbapi>