accounts.getAccountInfo REST

Skip to end of metadata
Go to start of metadata

This method retrieves user account data.

 

Note: This method is part of the Registration-as-a-Service and the Profile Management - IDS packages. Both packages are premium platforms that require separate activation. If neither are part of your site package, please contact your Gigya Account Manager or contact us by filling in a support form on our site. You can also access the support page by clicking "Support" on the upper menu of Gigya's site.

 

Request URL

Where <Data_Center> is:
  • us1.gigya.com - For the US data center.
  • eu1.gigya.com - For the European data center.
  • au1.gigya.com - For the Australian data center.
  • ru1.gigya.com - For the Russian data center.
  • cn1.gigya-api.cn - For the Chinese data center.

If you are not sure of your site's data center, see Finding Your Data Center.

Parameters

RequiredNameTypeDescription
UIDstringThe unique ID of the user for which to retrieve data. Use either this parameter or regToken .
If you call this method through an external OAuth2 SDK, then the UID may be passed implicitly within the access_token.
regTokenstringThe regToken returned from accounts.initRegistrationaccounts.register or accounts.login API calls when the registration process has not been finalized. Please note that the regToken you receive from Gigya is valid for only one hour.
  Note: You are required to pass only one of the parameters - eitherUID or regToken.
includestring 

A comma-separated list of fields to include in the response. The possible values are: identities-active,identities-all,identities-global,loginIDs,emails,profile,data,password,lastLoginLocation,regSource,irank,rba. The default value is "profile,data" so if this parameter is not used, the response will return the Profile and data objects.

Note: Make sure the parameter does not contain spaces between the values.

extraProfileFieldsstring This parameter accepts a comma-separated list of additional social profile fields to retrieve. The current valid values are: languages, address, phones, education, honors, publications,  patents, certifications, professionalHeadline, bio, industry, specialties, work, skills, religion, politicalView, interestedIn, relationshipStatus, hometown, favorites, followersCount, followingCount, username, locale, verified, timezone, likes and samlData .
format string Determines the format of the response. The options are:
  • json (default)
  • jsonp - if the format is jsonp then you are required to define a callback method (see parameter below).
callback string This parameter is required only when the format parameter is set to jsonp (see above). In such cases this parameter should define the name of the callback method to be called in the response, along with the jsonp response data.
httpStatusCodes Boolean The default value of this parameter is false, which means that the HTTP status code in Gigya's response is always 200 (OK), even if an error occurs. The error code and message is given within the response data (see below). If this parameter is set to true, the HTTP status code in Gigya's response would reflect an error, if one occurred.

Authorization Parameters

Each REST API request must contain identification and authorization parameters.

Please refer to the Authorization Parameters section for details. 

Response Data

FieldTypeDescription
 
statusCode integer The HTTP response code of the operation. Code '200' indicates success.
errorCode integer The result code of the operation. Code '0' indicates success, any other number indicates failure. For a complete list of error codes, see the Error Codes table.
statusReason string A brief explanation of the status code.
errorMessage string A short textual description of an error, associated with the errorCode, for logging purposes. This field will appear in the response only in case of an error.
errorDetails string This field will appear in the response only in case of an error and will contain the exception info, if available.
callId string Unique identifier of the transaction, for debugging purposes.
time string The time of the response represented in ISO 8601 format, i.e., yyyy-mm-dd-Thh:MM:ss.SSSZ or
     
UID string The unique user ID. This user ID should be used for login verification. See User.UID for more information.
UIDSignature string The signature that should be used for login verification. See User.UID for more information.
signatureTimestamp stringThe GMT time of the response in UNIX time format, i.e., the number of seconds since Jan. 1st 1970. The timestamp should be used for login verification. See User.UID for more information.
created string The time the account was created in ISO 8601 format, e.g., "1997-07-16T19:20:30Z".
createdTimestamp integer The time the account was created in Unix time format including milliseconds (i.e., the number of seconds since Jan. 1st 1970 * 1000).
data JSON object Custom data. Any data that you want to store regarding the user that isn't part of the Profile object.
emails JSON object The email addresses belonging to the user. This includes the following fields:
  • verified - an array of strings representing the user's verified email addresses
  • unverified - an array of strings representing the user's unverified email addresses.

Note: emails must be specified explicitly in the include parameter in order to be included in the response.

identities array An array of Identity Objects, each object represents a user's social identity. Each Identity Object contains imported data from a social network that the user has connected to.
Note: You must explicitly specify identities within the include parameter for them to be included in the response: identities-active , identities-all, or identities-global to return only active identities, all identities of a site, or all identities of a site group, respectively.
   

Be advised that if a user registers to your site using a Social Identity, then goes through the Forgot Password flow, a Site Login is added to their account, however, a Site Identity is not. A Site Identity can only be created when accounts.setAccountInfo is called on the user's account.

iRank integer Influencer rank of the user. The iRank is a number between 0-99, which denotes the percentile location of the user in comparison to all other site users as a site influencer. For example, if a user's iRank equals 60, this means that 60% of the site users influence less than this user, or in other words, this user is in the top 40% of site influencers.
The iRank is calculated based on the amount of exposure this user provides the site. The calculation is done for the past several months, where recent activities receive higher ranks. The iRank is per site (per API key), the same user may have different ranks for different domains. The iRank calculation uses the following parameters:
  • The number of friends this user has in all the networks to which he is connected through this site.
  • The number of times this user shared something in this site (per month).
  • The number of click backs that were made as a result of this user's shares.
isActive Boolean Indicates whether the account is active. The account is active once the user creates it even without finalizing it. The account can be deactivated, but it will still be registered if the registration process has been finalized.
isLockedOut Boolean Indicates whether the account is currently locked out.
isRegistered Boolean Indicates whether the user is registered. The user is registered once his registration has been finalized.
isVerified Boolean Indicates whether the account email is verified.
lastLogin string The time of the last login of the user in ISO 8601 format, e.g., "1997-07-16T19:20:30Z".
lastLoginLocation JSON object The user's last login location. This includes the following fields:
  • country - a string representing the two-character country code.
  • state - a string representing the state, where available.
  • city - a string representing the city name.
  • coordinates - an object containing:
    • lat - a double representing the latitude of the center of the city.
    • lon - a double representing the longitude of the center of the city.
lastLoginTimestamp integer The time of the last login of the user in Unix time format including milliseconds (i.e., the number of seconds since Jan. 1st 1970 * 1000).
lastUpdated string The time when the account object was last updated (either full or partial update) in ISO 8601 format, e.g., "1997-07-16T19:20:30Z". This is updated when any change is made to the account, for example, when a password is changed or a user logs in.
lastUpdatedTimestamp integer The time when the last update of the object occurred (either full or partial update) in Unix time, i.e., seconds since Jan. 1st 1970. Based on 'lastUpdated', 'Report AccountsFirstLogin' or 'AccountsReturnedLogin' event are fired.
loginIDs JSON object The user's login identifiers. This includes the following fields:
  • username - a string representing the username
  • emails - an array of strings representing email addresses
  • unverifiedEmails - an array of strings representing email addresses that were not validated

Note: loginIDs must be specified explicitly in the include parameter in order to be included in the response.

loginProvider string The name of the provider that the user used in order to login.
oldestDataUpdated string The time when the oldest data of the object was refreshed in ISO 8601 format, e.g., "1997-07-16T19:20:30Z".
oldestDataUpdatedTimestamp integer The time when the oldest data of the object was refreshed in Unix time format including milliseconds (i.e., the number of seconds since Jan. 1st 1970 * 1000).
password JSON object The user's Site account password details. Includes the following:
  • hash - the hashed password
  • hashSettings - object includes:
    • algorithm - Represents the hash algorithm used to encrypt the password.
    • rounds - Represents the number of iterations to perform the hashing.
    • salt - Represents the BASE64 encoded value of the salt.
    • format - Represents the template for merging clear-text passwords. This is only returned if the pwHashFormat parameter was set during account import and until the user's first login to Gigya (when the user's password is rehashed per the site's settings). See the RaaS Import Guide for additional information.
profile Profile object The user's profile information as described in the object. The profile is returned in the response by default, but if the include parameter is used to specify other fields that should be provided in the response, the profile must also be specified explicitly in the include parameter.
rbaPolicy string The current RBA Policy defined for the specified user.
registered string The time when the isRegistered parameter was set to true in ISO 8601 format, e.g., "1997-07-16T19:20:30Z".
registeredTimestamp string The GMT time when the isRegistered parameter was set to true in UNIX time format, i.e., the number of seconds since Jan. 1st 1970.
regSource string A string representing the source of the registration. Can be used to set varying destination pages in accounts.setPolicies.
socialProviders string A comma-separated list of the names of the providers to which the user is connected/logged in.
verified string The time when the isVerified parameter was set to true in ISO 8601 format, e.g., "1997-07-16T19:20:30Z".
verifiedTimestamp string The GMT time when the isVerified parameter was set to true in Unix time format including milliseconds (i.e., the number of seconds since Jan. 1st 1970 * 1000).

A field that does not contain data will not appear in the response.

Response Example

{
  "UID": "_gid_30A3XVJciH95WE*******7ee3MY+lUAtpVxvUWNseU=",
  "UIDSignature": "HHPLo/TC7KobjnGB7JflcWvAXfg=",
  "signatureTimestamp": "1412516469",
  "loginProvider": "facebook",
  "isRegistered": true,
  "isActive": true,
  "isLockedOut": false,
  "isVerified": true,
  "iRank": 57.3400,
  "loginIDs": {
    "emails": [],
    "unverifiedEmails": []
  },
  "emails": {
    "verified": [
      "*******@gmail.com"
    ],
    "unverified": []
  },
  "socialProviders": "facebook,site",
  "profile": {
    "firstName": "Pinky",
    "lastName": "Ray",
    "photoURL": "https://graph.facebook.com/v2.0/1020445*******25770/picture?type=large",
    "thumbnailURL": "https://graph.facebook.com/v2.0/102*******0325770/picture?type=square",
    "birthYear": 1980,
    "birthMonth": 4,
    "birthDay": 22,
    "profileURL": "https://www.facebook.com/app_scoped_user_id/1020*******25770/",
    "city": "Athens, Greece",
    "gender": "m",
    "age": 34,
    "email": "*******@gmail.com",
    "samlData": {}
  },
  "identities": [
    {
      "provider": "facebook",
      "providerUID": "10204456750325770",
      "isLoginIdentity": true,
      "photoURL": "https://graph.facebook.com/v2.0/1020*******5770/picture?type=large",
      "thumbnailURL": "https://graph.facebook.com/v2.0/102*******5770/picture?type=square",
      "firstName": "Pinky",
      "lastName": "Ray",
      "gender": "m",
      "age": "34",
      "birthDay": "22",
      "birthMonth": "4",
      "birthYear": "1980",
      "email": "*******@gmail.com",
      "city": "Athens, Greece",
      "profileURL": "https://www.facebook.com/app_scoped_user_id/1020*******770/",
      "proxiedEmail": "",
      "allowsLogin": true,
      "isExpiredSession": false,
      "lastUpdated": "2014-10-05T13:35:14.039Z",
      "lastUpdatedTimestamp": 1412516114039,
      "oldestDataUpdated": "2014-10-05T13:35:13.421Z",
      "oldestDataUpdatedTimestamp": 1412516113421
    },
    {
      "provider": "site",
      "providerUID": "_gid_30A3XVJciH*******+lUAtpVxvUWNseU=",
      "isLoginIdentity": false,
      "allowsLogin": false,
      "isExpiredSession": false,
      "lastUpdated": "2014-10-05T13:39:53.455Z",
      "lastUpdatedTimestamp": 1412516393455,
      "oldestDataUpdated": "2014-10-05T13:39:53.455Z",
      "oldestDataUpdatedTimestamp": 1412516393455
    }
  ],
  "data": {
    "hair": "blonde"
  },
  "password": {},
  "created": "2014-09-27T23:47:41.527Z",
  "createdTimestamp": 1411861661527,
  "lastLogin": "2014-10-05T13:35:13.437Z",
  "lastLoginTimestamp": 1412516113437,
  "lastUpdated": "2014-10-05T13:39:53.455Z",
  "lastUpdatedTimestamp": 1412516393455,
  "oldestDataUpdated": "2014-10-05T13:35:13.421Z",
  "oldestDataUpdatedTimestamp": 1412516113421,
  "registered": "2014-09-27T23:47:41.59Z",
  "registeredTimestamp": 1411861661590,
  "verified": "2014-09-27T23:47:41.543Z",
  "verifiedTimestamp": 1411861661543,
  "regSource": "",
  "lastLoginLocation": {
    "country": "IL",
    "coordinates": {
      "lat": 31.5,
      "lon": 34.75
    }
  },
  "rbaPolicy": {
    "riskPolicyLocked": false
  },
  "statusCode": 200,
  "errorCode": 0,
  "statusReason": "OK",
  "callId": "e6f891ac17f24810bee6eb533524a152",
  "time": "2015-03-22T11:42:25.943Z"
}