Skip to main content
Solved

Register a user and setting custom fields

  • December 23, 2021
  • 2 replies
  • 36 views

  • Helper ⭐️
  • 1 reply

I’m using the API to register a user - which works. But I can’t get setting custom profile fields at the time of registration to work.

According to https://api2-eu-west-1.insided.com/docs/user/#operation/register this should be possible.

I’m using JSON similar to this:

 
    "data": {
        "email""johnsmith@nowhere.com",
        "username""johnsmith",
        "password""notrealpassword999"
    },
    "profile_field": {
        "5""John",
        "6""Smith"
    },

 

The user is created but the custom profile fields are not set.  The 5 and 6 are the ids of the custom profile fields. The documentation suggests that I need to use the id number.

Setting the custom fields after registering the user works but that involves additional API calls - it would be nice to set them in the initial registration.

 

Best answer by fsk

I’ve just realised that my JSON has an error and that it should be like this:

 

 "data": {
        "email""johnsmith@nowhere.com",
        "username""johnsmith",
        "password""notrealpassword999",
    "profile_field": {
        "5""John",
        "6""Smith"
    }
}
View original
Did you find this topic helpful?

2 replies

  • Author
  • Helper ⭐️
  • 1 reply
  • Answer
  • December 23, 2021

I’ve just realised that my JSON has an error and that it should be like this:

 

 "data": {
        "email""johnsmith@nowhere.com",
        "username""johnsmith",
        "password""notrealpassword999",
    "profile_field": {
        "5""John",
        "6""Smith"
    }
}

alfonsmr
  • Helper ⭐️
  • 18 replies
  • December 23, 2021

Thanks for clarifying. It will be useful to me!

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings