Change user settings using the API
Hi!
Is it possible to change a user setting (preference) using the API? I want to add a link to our 'success post page' that will disable the preference to show that page without having the user going to their profile and manually disable it.
According to the documentation, it's possible to change them, but I don't see a list of settings
When I use this call on the browser on "/restapi/vc/users/id/<<MYUSERID>>/settings/settings" I only get these:
<response status="success"> <settings> <setting name="profile.signature" type="string">XXXXXX</setting> <setting name="profile.url_icon" type="string">XXXXXX</setting> <setting name="user.last_visit_date" type="string">XXXXXX</setting> <setting name="user.registration_date" type="string">XXXXXX</setting> </settings> </response>
Any suggestions?
Thanks!
fuenteso there's no list of the settings, but you can (in most cases) getting it looking at the name of the field in the settings page:
(be aware that dots are removed, so this is actually config.show_confirm_page_on_post).
In this case, the call you're looking for is /restapi/vc/users/id/<id>/settings/name/config.show_confirm_page_on_post (and /restapi/vc/users/id/<id>/settings/name/config.show_confirm_page_on_post/set?value=<true,false> to set).