API_GetUserInfo

Overview

Use API_GetUserInfo to get the username and user ID associated with an email address used for Quick Base 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 Quick Base 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 Quick Base. (For users who aren’t registered in Quick Base 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.

top

Request parameters

Parameter Value Required?

ticket

A valid authentication ticket.

The authentication ticket is returned via the API_Authenticate call.

yes

email

Supply the email address (as registered with Quick Base) 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 Quick Base but it will be returned in the response.

no

top

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 user's LDAP login, if applicable

  • The user's Quick Base screen (user) name, if LDAP is not being used

  • The user's email address, if the user has no LDAP login or Quick Base user name

The aggregate is structured as follows:

<user id="56760756.bpxd">
    <firstName>jdoe</firstName>
    <lastName>qb</lastName>
    <login>jdoe.qb@gmail.com</login>
    <email>jdoe.qb@gmail.com</email>
    <screenName></screenName>
     <isVerified>1</isVerified>
      <externalAuth>0</externalAuth>
</user>

udata

Optional. Contains any udata value supplied in the request.

top

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>

top

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.

top

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>

 

Go back    |     |  

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