getProfile
AppDelegate.reachfive().getProfile(authToken)
Description
Retrieve the profile’s information.
|
Examples
import IdentitySdkCore
let profileAuthToken: AuthToken = // Here paste the authorization token of the profile retrieved after login
AppDelegate
.reachfive()
.getProfile(authToken: profileAuthToken)
.onSuccess { profile in
// Get the profile
}
.onFailure { error in
// Return a ReachFive error
}
Parameters
Parameter | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Authorization token of the profile retrieved from login.
|
Response
Type: Future<Profile, ReachFiveError>
It will return the fetched profile, otherwise you’ll get a ReachFiveError
.
Profile
id |
The ReachFive identifier of the profile. |
||||||||||||
givenName |
The given name of the profile. |
||||||||||||
middleName |
The middle name of the profile. |
||||||||||||
familyName |
The family name of the profile. |
||||||||||||
name |
The full name of the profile. |
||||||||||||
nickname |
The nickname of the profile. |
||||||||||||
birthdate |
The birthdate of the profile, represented as an ISO 8601 |
||||||||||||
profileURL |
The URL of one of the user’s profile page (usually a social provider’s page). |
||||||||||||
picture |
The URL of one of the profile picture. This URL refers to an image file (PNG, JPEG, or GIF image file). |
||||||||||||
externalId |
The external identifier of the profile. |
||||||||||||
authTypes |
The list of the authentication providers used to login by the profile (e.g. facebook, password …). |
||||||||||||
loginSummary |
The login activities history of the profile.
|
||||||||||||
username |
The username of the profile (the login’s name). |
||||||||||||
gender |
The gender of the profile. Allowed values are |
||||||||||||
email |
The primary email address of the profile. |
||||||||||||
emailVerified |
|
||||||||||||
emails |
The e-mail addresses of the profile.
|
||||||||||||
phoneNumber |
The primary phone number of the profile. Both the international format and the national conventions of the account’s country are accepted if configured in account settings. |
||||||||||||
phoneNumberVerified |
|
||||||||||||
addresses |
The list of the profile’s postal addresses. To get this attribute, the profile must have been granted the
|
||||||||||||
A complementary address field which can contain additional information about the address.
!locality This value can’t be an empty string.
!deliveryNote |
locale |
||||||||||||
The profile’s language code in lowercase and country code in uppercase, separated by a dash (e.g. |
bio |
||||||||||||
The biography of the profile. |
customFields |
||||||||||||
The custom fields of the profile. |
consents |
||||||||||||
The consents granted to the profile. It is a map of string keys with the associated consent object. !===
!granted Allowed values: |
createdAt |
||||||||||||
The time the profile’s information was created. |
updatedAt |
ReachFiveError
Based on the problem, the ReachFiveError
will be:
-
RequestError(requestErrors: RequestErrors)
if it’s a bad request error.error
string
The main error message.
errorId
string
The identifier of the error.
errorUserMsg
string
The user-friendly error message.
This property is translated according to the user’s browser settings. Currently supported languages: - Currently supported languages
-
-
ar
- العربية Arabic -
de
- Deutsch German -
en
- English -
es
- Español Spanish -
fr
- Français French -
hu
- Magyar Hungarian -
it
- Italiano Italian -
jp
- 日本 Japanese -
ko
- 한국인 Korean -
nl
- Nederlands Dutch -
pt
- Portuguese -
ru
- Ру́сский Russian -
sk
- Slovenský Slovak -
zh-CN
- People’s Republic of China Simplified Chinese -
zh-Hans
- Simplified Chinese -
zh-Hant
- Traditional Chinese -
zh-HK
- Hong Kong Traditional Chinese -
zh-MO
- Macao Traditional Chinese -
zh-SG
- Singapore Simplified Chinese -
zh-TW
- Taiwan Traditional Chinese
-
errorMessageKey
string
The error message key.
errorDescription
string
The technical error message.
errorDetails FieldError[]
field
string
The field concerned by the error.
message
string
The message error returned for the
field
.code
string
The code error returned for the
field
.-
AuthFailure(reason: String)
if the authentication has failed. -
AuthCanceled
if the authentication was cancelled. -
TechnicalError(reason: String)
if it’s an internal server error.