Forum Discussion

micha80's avatar
micha80
Expert
10 years ago

Save user setting return error 100

Hi,   I want to save the user first_name value using the rest api but when I make the ajax call I got error 100 (Unknown error occured). So I can not save the value. I read the documentation but co...
  • OlivierS's avatar
    OlivierS
    10 years ago

    PaoloT good point ;)

     

    In that case, the error 100 might come from the settings name (name_first and not first_name)

     

    micha80 

     

    Instead of 

     

    var apiURL = '/restapi/vc/authentication/sessions/current/user/profiles/name/first_name/set?restapi.response_format=json';

    Use

     

    var apiURL = '/restapi/vc/authentication/sessions/current/user/profiles/name/name_first/set?restapi.response_format=json';

     

    Also, I believe it's worth checking if the following call:

     

    https://<your_community_url>/restapi/vc/users/self/profiles

     return a value for name_first as this example: 

     

    <profile name="name_first" type="string">Olivier</profile>

     

     Which I don't think it does on your community micha80 (I will reach out to you by email)