NOTE: Trivore ID Documentation has moved to https://trivoreid.com
The content on this site IS OUT OF DATE!
This space has been archived!
Please go ahead to the new site!
Profile Service (python)
Wrapper for the '/user/{userId}/profile' API. Cannot be used with the Management API. (OIDC Client only)
List of all options:
- Get profile fields
- Update profile fields
Profile management
from trivoreid.models.profile import Profile from trivoreid.models.email import EmailAddress from trivoreid.models.user import (Names, Mobile, Address) profile = api.profile_service.get() print('\nProfile fields : {} \n'.format(profile.serialize())) profile.name.givenName = 'First Name' profile.name.middleName = 'Middle Name' profile.name.familyName = 'Last Name' profile.addresses[0].country = 'FI' profile.addresses.append(Address({'addressName' : 'address', 'name' : 'home', 'country' : 'Finland', 'locality' : 'fi', 'postalCode' : '20750', 'region' : 'Region', 'streetAddress' : 'Street Address 5C' })) profile.emails[0].name = 'home' profile.emails.append(EmailAddress({'address' : 'example2@trivore.com', 'name' : 'work'})) mobile = Mobile() mobile.number = '+358401234568' mobile.name = 'work' profile.mobiles.append(mobile) api.profile_service.update(profile) profile2 = api.profile_service.get() print('\nProfile fields : {} \n'.format(profile2.serialize()))
Profile Service Models
/wiki/spaces/TISpubdoc/pages/20515246
/wiki/spaces/TISpubdoc/pages/20515253
/wiki/spaces/TISpubdoc/pages/20515254
/wiki/spaces/TISpubdoc/pages/20515250