h3. identity    {anchor:id=SOCref.DevRef.RestService_APIs_v1alpha1.IdentityResources.identity}
{note}
*Avatar link*

If the avatar is not uploaded yet by users, the default avatar link will be returned and this link must be an absolute link.
{note}
h4. GET identity/:providerId/:remoteId.format    {anchor:id=SOCref.DevRef.RestService_APIs_v1alpha1.IdentityResources.identity.Get}

*Description*: Gets the identity and its associated profile by specifying its _providerId_ and _remoteId_. Every identity has
 its providerId and remoteId. There could be as many identities as possible. Currently, there are 2 built-in types of identities
  (user identities and space identities) in eXo Social.
* *user identities*: _providerId_ = organization; _remoteId_ = portal user name.
* *space identities:* _providerId_ = space; _remoteId_ = space's pretty name.

*Url*:

{code}http://{domain_name}/{rest_context_name}/private/api/social/{version}/{portal_container_name}/identity/:providerId/:remoteId.format{code}

*For example*:
* [http://platform35.demo.exoplatform.org/rest/private/api/social/v1-alpha3/portal/identity/organization/demo.json]

* [http://localhost:8080/rest-socialdemo/private/api/social/v1-alpha3/socialdemo/identity/organization/demo.json]

* [http://localhost:8080/rest-socialdemo/private/api/social/v1-alpha3/socialdemo/identity/space/aaaa.json]

*Supported Format*: json

*Requires Authentication*: true

*Parameters*: No

*Examples*:
* *JSON*

*Request*:

{code}
GET: http://localhost:8080/rest-socialdemo/private/api/social/v1-alpha3/socialdemo/identity/organization/demo.json
{code}

*Response*:

{code}
{
  "id" : "123456789",
  "providerId": "organization",
  "remoteId": "demo",
  "profile": {
    "fullName": "Demo Gtn",
    "avatarUrl": "http://localhost:8080/socialdemo/demo/profile/avatar/demo.jpg"
  }
}
{code}

h4. GET: {noformat}identity/:identityId.format{noformat} {anchor:id=SOCref.DevRef.RestService_APIs_v1alpha1.IdentityResources.Notes.Get}

*Description*: Gets the identity and its associated profile by the identityId.

*Url*:

{code}http://{domain_name}/{rest_context_name}/private/api/social/{version}/{portal_container_name}/identity/:identityId.format{code}

For example:

* [http://platform35.demo.exoplatform.org/rest/private/api/social/v1-alpha3/portal/identity/387cab38c0a8013768f5a753041b17dc.json]

* [http://localhost:8080/rest-socialdemo/private/api/social/v1-alpha3/socialdemo/identity/387cab38c0a8013768f5a753041b17dc.json]

*Supported Format*: json

*Requires Authentication*: false

*Parameters*: No

*Examples*:
* *JSON*

*Request*:

{code}
GET: http://localhost:8080/rest-socialdemo/private/api/social/v1-alpha3/socialdemo/identity/123456789.json
{code}

*Response*:

{code}
{
  "id" : "123456789",
  "providerId": "organization",
  "remoteId": "demo",
  "profile": {
    "fullName": "Demo Gtn",
    "avatarUrl": "http://localhost:8080/socialdemo/demo/profile/avatar/demo.jpg"
  }
}{code}
