General
Client Authentication
User Authentication
Examples
create_user_session
Arguments
Return Value
get_user_session
Arguments
Return Value
destroy_user_session
Arguments
Return Value
Registration/Statistic methods
register_user
Arguments
Return Value
get_user_profile
Arguments
Return Value
change_user_profile
Arguments
Return Value
get_countries
Arguments
Return Value
get_regions
Arguments
Return Value
get_cities
Arguments
Return Value
Structure of Fields
Structure of Dating Fields
Possible Languages
User Profile Synchronization
Community Profiles
get_user_communities
Arguments
Return Value
get_community_profile_questions
Arguments
Return Value
get_community_profile_answers
Arguments
Return Value
update_community_profile_answer
Arguments
Return Value
Authentication Cookies
Interface URL: http://en.mylivepage.com/mylivepage-rpc?_type=flat...
General
You can use GET or POST request to send &name=value pairs to the server. Parameters _type and method are reserved. Each request has to contain method name in method parameter. Response will contain also URL-encoded &name=value pairs. Most methods require client authentication. This means that the incoming parameter should contain auth_name field and one of three fields: auth_password, auth_hpassword, or auth_session
Client Authentication
Client authentication used to restrict access to MyLivePage API.
It is realized with passing username/password to every request.
It is allowed to pass one of following sets of fields:
- auth_name, auth_password
- auth_name, auth_hpassword
- auth_name, auth_session
auth_password - password of the user,
auth_hpassword - md5 of password,
auth_session - session ID that can be received through User Authentication
Following authorization procedure used in case a method requires reading/writing user data:
- if the client is a normal user then he can manipulate only his data
- if the client is a partner then he can manipulate only his user's data (including himself)
User Authentication
User Authentication used in order to synchronize login/logout actions on MyLivePage Sites and Partner Sites. MyLivePage engine manages user authentication via sessions. This involves 3-stage process:
- Login using username and password. Clients should call create_user_session, pass username/password and get session ID.
- Checking whether session ID is correct using get_user_session
- Logout using destroy_user_session
Examples
request:
http://en.mylivepage.com/mylivepage-rpc?_type=flat&method=create_user_session &auth_name=test.test.com&auth_password=test&username=user.test.com&password=testresponse:
status=1&session=486a%3B94ee69c6ecaabb8ec3830b8fc93
request:
http://en.mylivepage.com/mylivepage-rpc?_type=flat&method=get_user_session &auth_name=test.test.com&auth_password=test&username=user.test.com&session=486a%3B94ee69c6ecaabb8ec3830b8fc93response:
status=1
request:
http://en.mylivepage.com/mylivepage-rpc?_type=flat&method=destroy_user_session &auth_name=test.test.com&auth_password=test&username=user.test.comresponse:
status=1
request:
http://en.mylivepage.com/mylivepage-rpc?_type=flat&method=get_user_session &auth_name=test.test.com&auth_password=test&username=user.test.com&session=486a%3B94ee69c6ecaabb8ec3830b8fc93response:
status=0
create_user_session
Authenticates user via username/password and creates user session. This method requires client authentication (see Client Authentication).
Arguments
[struct]
- username string (mandatory)
- password string
- hpassword string: md5 of password
Return Value
[struct]
- status boolean: true if login was successful or false elsewhere
- session string: session ID, set only if login was successful
get_user_session
Authenticates user session. It checks whether passed session ID is valid. This method requires client authentication (see Client Authentication).
Arguments
[struct]
- username string (mandatory)
- session string (mandatory): session ID to check
Return Value
[struct]
- status boolean: true if session ID is correct or false elsewhere
destroy_user_session
Session logout. This method requires client authentication (see Client Authentication).
Arguments
[struct]
- username string (mandatory)
- session string (mandatory): session ID to check
Return Value
[struct]
- status boolean: true if logout was successful or false elsewhere
Registration/Statistic methods
register_user
Registers new user. Only partners can register new users, so authorization as a partner required (see Client Authentication).
Either password or hpassword has to be specified.
Arguments
[struct]
- username string (mandatory)
- email string (mandatory) - has to be a correct email address
- activate boolean (mandatory) - make account active if true
- lang string (mandatory)
- password string
- hpassword string
- dating_searchable boolean (optional), default: true - participate in dating search
Return Value
[struct]
- status boolean: true if registration was successful or false elsewhere
get_user_profile
Returns some user properties from About page. This method requires client authentication (see Client Authentication).
Arguments
[struct]
- username string (mandatory)
Return Value
[struct]
- community boolean
- rating int: 0 - participate, 1 - not participate, 2 - adult site (not participate)
- gmt int: GMT timezone
- template int
- style int
- display_name string
- lang string
- realname string
- realsurename string
- sign string
- keywords string
- icq string
- aol string
- yahoo string
- msn string
- nationality string
- job string
- about string
- country string (deprecated)
- city string (deprecated)
- region string (deprecated)
- postalcode string
- geo_country_id string
- geo_region_id string
- geo_city_id int
- city_other string
- interests array: array of strings
- dating_searchable boolean
- dating_sex string
- birthday dateTime.iso8601
- dating_height string
- dating_weight string
- dating_constitution string
- dating_hair string
- dating_study string
- dating_finance string
- dating_residing string
- dating_marriage string
- dating_children string
- dating_smoking string
- dating_alcohol string
- dating_drugs string
- dating_aim struct
- dating_description string
change_user_profile
Change some user properties from About page. This method requires client authentication (see Client Authentication).
Arguments
[struct]
- username string (mandatory)
- community boolean
- rating int: 0 - participate, 1 - not participate, 2 - adult site (not participate)
- gmt int: GMT timezone
- template int
- style int
- display_name string
- lang string
- realname string
- realsurename string
- sign string
- keywords string
- icq string
- aol string
- yahoo string
- msn string
- nationality string
- job string
- about string
- country string (deprecated)
- city string (deprecated)
- region string (deprecated)
- postalcode string
- geo_country_id string - country code
- geo_region_id string - region code
- geo_city_id int - city id
- city_other string
- interests array: array of strings
- dating_searchable boolean
- dating_sex string
- birthday dateTime.iso8601
- dating_height string
- dating_weight string
- dating_constitution string
- dating_hair string
- dating_study string
- dating_finance string
- dating_residing string
- dating_marriage string
- dating_children string
- dating_smoking string
- dating_alcohol string
- dating_drugs string
- dating_aim struct
- dating_description string
Omitted fields will remain unchanged.
Pass geo_country_id,geo_region_id,geo_city_id,city_other to define user location.
See also get_countries, get_regions, get_cities.
Return Value
[struct]
- status boolean: true if change was successful or false elsewhere
get_countries
Get list of countries. This method requires client authentication (see Client Authentication)
Arguments
[struct]
- lang string - default 'en'
Return Value
[struct]
- countries array of structs
- code string
- name string
get_regions
Get list of regions. This method requires client authentication (see Client Authentication)
Arguments
[struct]
- geo_country_id string (mandatory) - country code
- lang string - default 'en'
Return Value
[struct]
- regions array of structs
- region string - region code
- name string
get_cities
Get list of cities. This method requires client authentication (see Client Authentication)
Arguments
[struct]
- geo_country_id string (mandatory) - country code
- geo_region_id string (mandatory) - region code
- lang string - default 'en'
Return Value
[struct]
- cities array of structs
- id int
- name string
Structure of Fields
Structure of Dating Fields
Possible values (constants) of some dating fields:
- dating_sex: UNDEFINED, MALE, FEMALE
- dating_constitution: UNDEFINED, THIN, NORMAL, SPORTS, MUSCULAR, WELL-BUILT, PLUMP
- dating_hair: UNDEFINED, LIGHT, DARK, RED, DYED, BRIGHT, GREY
- dating_study: UNDEFINED, NONE, SCHOOL_STUDENT, SECONDARY, SPECIALIZED_SECONDARY_EDUCATION, UNIVERSITY_STUDENT, INCOMPLETE_HIGHER, HIGHER, HAVE_A_PHD
- dating_finance: UNDEFINED, LIVE_OFF_PARENTS, DONT_WORK, VARIABLE_INCOME, STABLE_SMALL_INCOME, STABLE_AVERAGE_INCOME, HIGH_INCOME
- dating_residing: UNDEFINED, SEPARATE_APPARTMENT, DORMITORY_SHARED_APPARTMENT_HOUSE, LIVE_WITH_PARENTS, LIVE_WITH_GIRLFRIEND_BOYFRIEND, LIVE_WITH_SPOUSE_PARTNER, NO_PERMANENT_RESIDENCE
- dating_marriage: UNDEFINED, YES_LIVE_TOGETHER, YES_LIVE_SEPARATELY, YES_MARRIAGE_FOR_IMAGE, NO
- dating_children: UNDEFINED, NO, NO_BUT_WILLING_TO_HAVE, YES_LIVE_TOGETHER, YES_LIVE_SEPARATELY
- dating_smoking: UNDEFINED, NO, TRYING_TO_QUIT, RARELY, FREQUENTLY
- dating_alcohol: UNDEFINED, DONT_DRINK, DRINK_SOCIALLY, DRINK_FREQUENTLY
- dating_drugs: UNDEFINED, NEVER_TRIED, FIND_DRUGS_UNACCEPTABLE, SOMETIMES_SMOKE_WEED, TAKE_SOFT, TAKE_HARD, TRYING_TO_QUIT, I_RECOVER_ON_NA, NOT_ANYMORE
dating_aim is a structure with following fields that take boolean values:
- MAKE_FRIENDS_AND_CHAT
- FIND_PENPAL
- LOVER_SERIOUS_RELATIONSHIP
- MARRIAGE_CREATION_OF_FAMILY
- BIRTH_EDUCATION_OF_THE_CHILD
- MARRIAGE_FOR_IMAGE
- MARRIAGE_FOR_IMMIGRATION
- SPORT_ACTIVE_RECREATION
- SHARED_RENT
- REGULAR_SEX_TOGETHER
- ONE_TIME_SEX_PARTNER
- GROUP_SEX
- VIRTUAL_SEX
- OFFER_X_SERVICES
- SEARCH_FOR_X_SERVICES
Possible Languages
en, ru, cz, il, gr, my, ua, de, lt, fr, bg, cn, ee, es, sq, nl, sk
User Profile Synchronization
When user changes profile on a partner site, the partner should call change_user_profile on en.mylivepage.com. MyLivePage engine will call change_user_profile on partner's server when user changes profile on MyLivePage site for those partners that have this method implemented.
Community Profiles
Questions that communities ask members (profiles).
get_user_communities
get list of communities that the user belongs to
Arguments
[struct]
- username string (mandatory)
Return Value
[struct]
- communities array of structs:
- id int
- name string
get_community_profile_questions
get list of community questions
Arguments
[struct]
- username string (mandatory) - community name
Return Value
[struct]
- questions array of structs:
- id int
- communityid int
- question_text string
- question_type string - 'textfield'|'textfield_large'|'number'|'date'|'selectbox'|'checkbox'|'url'
- mandatory boolean
- num_maximum double
- num_minimum double
- multiple_choice boolean
- variants array of structs:
- id int
- variant_text string
get_community_profile_answers
Arguments
[struct]
- username string (mandatory)
- community_name string (optional) - constrain
- question_id int (optional) - constrain
Return Value
[struct]
- answers array of structs:
- id int
- communityid int
- questionid int
- text_answer string
- num_answer double
- bool_answer boolean
- date_answer dateTime.iso8601
- variant_answer int - id of answer
update_community_profile_answer
update answer or insert new one
Arguments
[struct]
- username string (mandatory)
- question_id int (mandatory)
- community_id int (mandatory)
- value mixed (mandatory) - type of value has to be string for (textfield, textfield_large,url), double or int for (number), dateTime.iso8601 for (date), int for (selectbox), boolean for (checkbox)
Return Value
[struct]
- status boolean
Authentication Cookies
The cookies used on MyLivePage sites (not for the API). Partners should set/unset the cookies for synchronization when users login/logout.
- mlp_name - name of user
- mlp_session - session ID



