View a User Profile

Endpoint URL: {registrationDomain} /entity



Description

Returns the specified user profile.

Refer to the Registration Error Codes section for details on error codes.


Respects the API Client Allow List:  Yes


API Client Permissions

The following table indicates the API clients that can (and the API clients that can't) be used to call this endpoint:

owner
access_issuer
direct_access
direct_read_access
login_client
Yes, but only if the owner client also has the direct_access feature.
No
Yes
Yes
No


Authentication

This endpoint supports Basic authentication (recommended), janrain-oauth authentication, and janrain-signed authentication. See the article Managing User Profiles by Using janrain-oauth Authentication for more information on how to use janrain-oauth in your API calls.

How to Create an Authentication String


Base URL

The base URL for this endpoint is your Identity Cloud Capture domain; for example:

https://educationcenter.us- dev.janraincapture.com

Your Capture domains (also known as Registration domains) can be found in the Console on the Manage Application page:


Examples

Example 1: Retrieving user data for a specific ID and created date

This command returns user profile information for the user with the ID 999.


curl -X POST -H "Authorization: Basic c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg=" \
  --data-urlencode type_name=user \
  --data-urlencode id=999 \
  https://my-app.janraincapture.com/entity
   

      Running this command in Postman


Example Response


{
  "result": {
    "birthday": null,
    "familyName": "Doe",
    "profiles": [],
    "id": 999,
    "middleName": null,
    "emailVerified": "2015-11-15 01:58:01 +0000",
    "primaryAddress": {
      "company": null,
      "address2": "",
      "stateAbbreviation": "NM",
      "zipPlus4": null,
      "city": "",
      "address1": "",
      "phone": "5551234567",
      "zip": "",
      "mobile": null,
      "country": "United States"
    },
    "gender": "male",
    "lastUpdated": "2016-03-13 19:39:17.856608 +0000",
    "password": null,
    "photos": [],
    "email": "johndoe@example.com",
    "givenName": "John",
    "currentLocation": null,
    "deactivateAccount": null,
    "lastLogin": "2016-03-13 19:39:17 +0000",
    "created": "2015-11-15 01:58:01.862312 +0000",
    "displayName": "John Doe",
    "uuid": "12345abc-1234-abcd-1234-12345abcde12",
    "aboutMe": null,
    "display": null,
    "statuses": []
  },
  "stat": "ok"
}
   


Example 2: Retrieving certain attributes for a specific user ID

This command returns four user profile attribute values (email, givenName, familyName and created)  for the user with the ID 999. These four attributes specify the user’s email address, first name, last name, and the date his or her user account was created.


curl -X POST \
  -H "Authorization: Basic c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg="\
  --data-urlencode type_name=user \
  --data-urlencode id=999 \
  --data-urlencode attributes='["email", "familyName", "givenName", "created"]' \
  https://my-app.janraincapture.com/entity
   

      Running this command in Postman


Example Response


{
  "result": {
    "familyName": "Parker",
    "email":"parkerm@example.com",
    "givenName":"Matthew",
    "created":"2015-12-31 18:54:59.900339 +0000"
  },
    "stat":"ok"
  }
   


Example 3: Retrieving data for a user with specific email address

This command retrieves the value of the created attribute for the user with the email address parkerm@example.com. The created attribute tells you the date and time that the user account was created.


curl -X POST \
  -H "Authorization: Basic c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg=" \
  --data-urlencode type_name=user \
  --data-urlencode key_attribute=email \
  --data-urlencode key_value='"parkerm@example.com"' \
  --data-urlencode attributes='["created"]'\
  https://my-app.janraincapture.com/entity
   


Example Response


{
  "result":{
    "created":"2015-10-05 21:37:13.031989 +0000"
  },
  "stat":"ok"
}
   


Example 4: Validating a user's password

This command verifies the password for the user with the ID 1537. To do this, the call specifies the attribute to be checked (password) and the supplied password value (p@ssw0rd). If the supplied value matches the user’s actual password, then the values included in the attributes parameter are returned (in this case, the user’s displayName). If the supplied value does not match the user’s actual password, then a 350 (invalid_password_value) error is returned.


curl -X POST \
  -H "Authorization: Basic c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg=" \
  --data-urlencode type_name=user \
  --data-urlencode id=1537 \
  --data-urlencode password_attribute=password \
  --data-urlencode password_value=p@ssw0rd \
  --data-urlencode attributes='["displayName"]'\
  https://my-app.janraincapture.com/entity
   


Example Response


{
  "result":{
    "created":"2015-10-05 21:37:13.031989 +0000"
  },
  "stat":"ok"
}
   


Example 5: Using an access token to view a user profile

The following command returns the user profile of the user who was issued the access token 26ccvnxxuwx45m7g. This command uses janrain-oauth authentication; see this page for more information.

curl -L -X POST \
  'https://se-demos-gstemp.us-dev.janraincapture.com/entity?access_token=26ccvnxxuwx45m7g'


Example Response


{
  "result": {
    "familyName": "Parker",
    "email":"parkerm@example.com",
    "givenName":"Matthew",
    "created":"2015-12-31 18:54:59.900339 +0000"
  },
    "stat":"ok"
  }
   


Note. In the interests of saving space, the preceding API response has been truncated.


Query Parameters

ParameterTypeRequiredDescription
attribute_namestringNoAttribute to be returned. When used, values are only returned for the specified attribute. (By default, all attribute values are returned.)
 
attributesstring NoJSON array of attributes to be returned. When used, values are only returned for the specified attributes. (By default, all attribute values are returned.)
 
createdstringNoTimestamp generated when the entity was created. If this value is present but is incorrect, the call fails.
 
last_udpatedstringNoTimestamp generated when the entity was last updated. If this value is present but is incorrect, the call fails.
 
type_namestringYesName of the entityType.
 
idstringNoID of the user record. Required unless you are using the uuid or key_attribute parameter.
 
uuidstringNoUUID of the user record. Required unless you are using the id or key_attribute parameter.
 
key_attributestringNoName of a unique attribute in the schema. This parameter is required unless you are using the uuid or id parameter, and must be used in conjunction with the key_value parameter.
 
key_valuestringNoValue assigned to the key_attribute parameter. String values must be enclosed in quotes.
 
password_attributestringYesPath to a schema attribute that includes a password constraint. You can use the password_attribute and password_value parameters together: use password_attribute to specify the attribute to authenticate against, and password_value to specify the authenticating password.
 
password_valuestringNoPlaintext value that is matched against the password attribute specified in the password_attribute parameter. If successful, the entity is returned. If unsuccessful, the API call fails.