View a user profile
Returns the specified user profile.
Refer to the Registration error codes page for details on error codes.
API client permissions
The following table indicates the API clients that can and can't be used to call this operation:
owner | access_issuer | direct_access | direct_access_read | login_client |
---|---|---|---|---|
✓ | ✗ | ✓ | ✓ | ✗ |
Authentication
This operation supports both Basic authentication (recommended) and janrain-signed authentication. See Get started for more information.
Base URL
The base URL for this operation is your Identity Cloud Capture domain; for example:
https://educationcenter.us-dev.janraincapture.com
Your Capture domain (also known as a Registration domain) can be found in Console on the Manage Application page.
Examples
Example 1: Retrieve user data with the specified ID
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
Example response
If your API call succeeds you'll get back profile information for the specified user:
{
"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: Retrieve 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
Example response
If your API call succeeds you'll get back the specified attributes and attribute values:
{
"result": {
"familyName": "Parker",
"email":"parkerm@example.com",
"givenName":"Matthew",
"created":"2015-12-31 18:54:59.900339 +0000"
},
"stat":"ok"
}
Example 3: Retrieve 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
If your API call succeeds you'll get back the value of the created attribute:
{
"result":{
"created":"2015-10-05 21:37:13.031989 +0000"
},
"stat":"ok"
}
Example 4: Validate 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 doesn't 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
If your API call succeeds you'll get back the display name of the user:
{
"result":{
"displayName":"Matthew Parker"
},
"stat":"ok"
}
Parameters
All parameters need to be configured as x-www-form-urlencoded body parameters.
Parameter | Type | Required | Description |
---|---|---|---|
attribute_name | string | ✗ | Attribute to be returned. When used, values are only returned for the specified attribute. (By default, all attribute values are returned.) |
attributes | JSON array | ✗ | JSON array of attributes to be returned. When used, values are only returned for the specified attributes. (By default, all attribute values are returned.) |
created | dateTime | ✗ | Timestamp generated when the entity was created. This value must match the value of the user's created attribute. If it doesn't, the call fails. |
lastUpdated | dateTime | ✗ | Timestamp generated when the entity was last updated. This value must match the value of the user's lastUpdated attribute. If it doesn't, the call fails. |
type_name | string | ✓ | Name of the entity type storing the user profile. |
id | string | ✗ | Unique identifier of the user record. Required unless you are using the uuid or key_attribute parameter. |
uuid | string | ✗ | Unique identifier of the user record. Required unless you are using the id or key_attribute parameter. |
key_attribute | string | ✗ | Name of a unique attribute in the schema that can identify the user. This parameter is required unless you are using the uuid or id parameter. |
key_value | string | ✗ | Value assigned to the key_attribute parameter. For example, if key_attribute is set to email then key_value needs to be set to the user's email address. String values must be enclosed in quotes. |
password_attribute | string | ✗ | Path 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. |
passsword_value | string | ✗ | Plaintext value matched against the password attribute specified in the password_attribute parameter. If successful, the entity is returned. If u not successful the API call fails. |
Updated over 1 year ago