Identity providers return user profile data along with session information when a user authenticates successfully. You can use the user profile information to help the user by filling out sign-up or registration forms, as well as to recognize each user and learn more about them in order to give the user a tailored experience.
The Akamai servers return normalized user profile data in standard Portable Contacts (POCO) format. This makes it easier for you to parse and use the profile data without having to learn about each provider’s data format.
Normalized User Profile Data
Social Login converts the data we receive in one of the diverse data formats returned by the identity providers into a single standard format. We call this process normalization. Programmers save time immediately by learning only one format, and repeatedly by not needing to update their code when new providers are added or providers change their data format.
Personal Data Fields
This section outlines the fields in the normalized profile structure. The Availability column shows whether or not all providers include the field in their profile data responses.
Key | Description | Availability |
---|---|---|
address | See the address Field section for details. | Available from most providers (with user consent). |
birthday | Date of birth in YYYY-MM-DD format. The Year field value may be 0000 if unavailable. | Available from most providers (with user consent). |
displayName | The name of this contact, suitable for display to end users. | Available from most providers (with user consent). |
An email address at which the person may be reached. | Available from most providers (with user consent). Not available from LinkedIn, MySpace, or Twitter. | |
gender | The person’s gender. Canonical values are female and male, but it may be any value. | Available from most providers (with user consent). |
identifier | The user’s OpenID URL. Use this value to sign the user in to your website. | Guaranteed |
limitedData | A boolean value. The value is true if Social Login was able to retrieve only limited public data from the user’s profile (for example, because the login session has expired or the user logged out from his/her account). If Social Login succeeded in retrieving the complete set of data, this field will be missing or set to false. | Provided only by Facebook. |
name | A dictionary of name parts. See the name Field section for details. | Available from most providers (with user consent). Yahoo! returns only a full name, not a first name or last name field. |
phoneNumber | A phone number at which the person may be reached. | Available from most providers (with user consent). |
photo | The URL to a photo (GIF, JPG, or PNG) of the person. | Available from most providers (with user consent). |
preferredUsername | The preferred user name of this contact (for sites that ask for a user name). | Available from most providers (with user consent). |
primaryKey | The primary key of the user in your database. Present only if you are using the mapping API. | Guaranteed (if a mapping exists). |
providerName | A human-readable name of the authentication provider that was used for this authentication. For well-known providers, Akamai sends values such as Google, Facebook, and MySpace (Other is sent for other providers). New provider names are added over time. | Guaranteed |
URL | The URL of a webpage relating to this person. | Available from most providers (with user consent). |
utcOffset | The offset from UTC of this contact’s current time zone, as of the time this response was returned. The value must conform to the offset portion of xs:dateTime (for example, -08:00). | Available from most providers (with user consent). |
verifiedEmail | A timestamp. | Available from:
|
name Field
The name field holds components of the end user’s real name. Providers may return:
- The full name as a single string in the formatted sub-field, or
- The individual component fields (using the other sub-fields), or
- Both
If a provider returns both variants, the provider should describe the same name, with the formatted name indicating how the component fields should be combined.
Key | Description |
---|---|
familyName | The family name of this contact (last name in most Western languages). |
formatted | The full name, including all middle names, titles, and suffixes (as appropriate) formatted for display. |
givenName | The given name of this contact (first name in most Western languages). |
honorificPrefix | The honorific prefix(es) of this contact (title in most Western languages). |
honorificSuffix | The honorific suffix(es) of this contact (suffix in most Western languages). |
middleName | The middle name(s) of this contact. |
address Field
Note that not all providers return all address data, and the level of specificity of the address is determined by each provider.
Key | Description |
---|---|
country | The country name component. |
formatted | The full mailing address, formatted for display or use with a mailing label. |
locality | The city or locality component. |
postalCode | Postal code or ZIP code. |
region | The state or region component. |
streetAddress | The full street address component which may include house number, street name, PO box, and multi-line extended street address information. |
Provider-specific Fields
Some identity providers return fields specific only to them. These fields are present in the provider dictionary keyed by the provider name.
Key | Description | Provider |
---|---|---|
active | A boolean value where true means the user is active and false means the user is not active. | Salesforce |
bloodType | The user’s blood type. | Mixi |
favoriteThings | List of the user’s favorite things, broken down by order (numerical value), type (category), and value (text). | Mixi |
friendshipList | A list of the user’s friends on the Renren site. This is part of the extended profile data. | Renren |
locale | User’s locale. | Salesforce |
occupation | The user’s occupation. | Mixi |
photos | The photos the user has uploaded to the Renren site. This is part of the extended profile data. | Renren |
pings | Whether Foursquare receives pings from this user, if they have a relationship. | Foursquare |
positions | Collection of positions, each with boolean value isCurrent and name (employer name). | |
relationship | The relationship of the acting user (me) to this user (them). | Foursquare |
type | One of: brand, celebrity, or user. Users can establish their type when following relationships with celebrities. | Foursquare |
userType | The user type. | Salesforce |
Facebook-specific Fields
We describe these fields separately because they have a different structure (each field contains a number of sub-fields or elements).
Key | Sub-fields | Type | Description |
---|---|---|---|
albums | plural | A set of fields describing a photo album saved somewhere on Facebook. | |
id | string | The Facebook ID of the album, consisting of a string of numbers. | |
name | string | The text name of the album. | |
privacy | string | The privacy setting of the album, such as public, friends, or custom. | |
type | string | The type of Facebook post that contains the album (or link to the album) such as normal, wall, or profile. | |
games | plural | A set of fields describing a game. Can be any sort of game. | |
name | string | The text name of the game. | |
category | string | A Facebook category, such as interest. | |
id | string | The Facebook ID of the game, consisting of a string of numbers. | |
groups | A set of fields describing a Facebook group. | ||
name | string | The name of the Facebook group. | |
id | string | The Facebook ID of the group, consisting of a string of numbers. | |
videos | A set of fields describing a video. | ||
id | string | The Facebook ID of the video, consisting of a string of numbers. | |
description | string | A text string describing the video. | |
picture | url | The URL to a thumbnail picture of the video. | |
icon | url | The URL to an icon for the video. | |
embed_html | string | A block of html code that you can embed on your page to play video on your site. | |
source | url | The source for the video. |