/api/identity/v1/accounts
Returns the accounts of an Identity.
Request
GET /{tenant}/api/identity/v1/accounts
GET /{tenant}/api/identity/v1/{id}/accounts
Authentication
For more information on how to authenticate see How To: Call The Identity Hub API
Request Parameters
Name | Value | Description | Required |
---|---|---|---|
id | The identityId of the identity | Instructs The Identity Hub to return the accounts of the identity matching the provided identityId. The caller must be authorized to access the identity. | No (defaults to authenticated identity) |
Example Request
GET /{tenant}/api/identity/v1/12487978/accounts
Authorization: Bearer puDWcq-4-xLwoG6y0DwZRA
Host: www.theidentityhub.com
Response
If the method call is successful returns the accounts of the identity in JSON format. If there is more than one Account Provider in the Tenant, will return information on the Account Provider even if the identity does not have an Account for that Account Provider. The information can be used to redirect the user to link an Account to the identity.
Name | Value | Description |
---|---|---|
accountProviderId | string | A unique identifier of the Account Provider |
accounts | Array of Account | See Accounts |
canAddAnotherAccount | true or false |
true if the identity can add another account of the Account Provider type, false otherwise |
displayName | string | Display name of the Account Provider (if any) |
providerImageUrl | URL | Link to Account Provider image (if any) |
signInUrl | URL | URL to redirect the user to add an account for this Account Provider to the identity |
Accounts
Name | Value | Description |
---|---|---|
accountId | string | A unique identifier of the account |
accountPrivatePersonalIdentifier | string | A unique identifier of the account as returned by the Account Provider (e.g. ADFS, Twitter...) |
accountProfileUrl | URL | URL to profile of the account |
displayName | string | The display name of the account |
emailAddress | email address | The email address of the account |
issuedUserId | string | A unique identifier of the account as returned by the Account Provider |
pictureUrl | URL | Profile pictures of the account |
isCurrent | true or false |
true if the account was used to authenticate for the current session (the Access Token used to authenticate), false otherwise |
Example Response
[
{
"accountProviderId": "3313069221789451233",
"accounts": [],
"canAddAnotherAccount": false,
"displayName": "HUB Account Provider (Username/Password)",
"providerImageUrl": "https://www.theidentityhub.com/Content/Images/U2UConsult.jpg",
"signInUrl": "https://www.theidentityhub.com/{tenant}/Profile/Home/LinkAccount/3313069221789451233"
},
{
"accountProviderId": "915653738617894564",
"accounts": [
{
"accountId": "68048374787445784564564",
"accountPrivatePersonalIdentifier": "7897456454454564a",
"accountProfileUrl": "https://www.facebook.com/7897456454454564a",
"displayName": "John Doe",
"emailAddress": "John_Doe@hotmail.com",
"issuedUserId": "7897456454454564a",
"pictureUrl": "https://graph.facebook.com/v3.1/706452235/picture?type=small",
"isCurrent": true
}
],
"canAddAnotherAccount": true,
"displayName": "Facebook Account",
"providerImageUrl": "https://www.theidentityhub.com/Content/Images/Facebook.png",
"signInUrl": "https://www.theidentityhub.com/{tenant}/Profile/Home/LinkAccount/915653738617894564"
},
{
"accountProviderId": "7468784964542669643",
"accounts": [],
"canAddAnotherAccount": true,
"displayName": "U2U Consult ADFS",
"providerImageUrl": "https://www.theidentityhub.com/content/images/u2uconsult2.png",
"signInUrl": "https://www.theidentityhub.com/{tenant}/Profile/Home/LinkAccount/7468784964542669643"
}
]