How to pass preferences in CURL?

  • 1
  • Question
  • Updated 10 months ago
I'm using CURL to create a client user which works just fine. But I'm unable to pass preferences like CanResetPassword:false. Here is my CURL (some obvious stuff hidden).

curl -k -H "Content-Type: application/json" -X POST -d "{'FirstName':'Test','LastName':'LastTest','Password':'Pa$$w0rd','Email':'my@email.com','Preferences.CanResetPassword':false}" "https://mycompany.sf-api.com/sf/v3/Users"; -H "Authorization: Bearer token_id"

It creates the client account but the preference to disable Password reset is not passed through.

Any hint?

thanks
Patrick

Photo of Patrick Buser

Patrick Buser

  • 4 Posts
  • 0 Reply Likes

Posted 10 months ago

  • 1
Photo of Patrick Buser

Patrick Buser

  • 4 Posts
  • 0 Reply Likes
I just figured it out. The preferences should be set in brackets like this:
'Preferences':{'CanResetPassword':false}