Massimo_Redaelli is trying to use the API to update a user’s profile, specifically the name field, but is getting a 404 error. joffreyjaffeux provides a working curl example with an application/json Content-Type header and a JSON body. However, Massimo_Redaelli is still getting the same error.
joffreyjaffeux suspects that the issue might be due to a session being lost between http://disc.uaar.it/ and https://www.uaar.it. Massimo_Redaelli notes that the API request works for setting user groups, but not for updating the user profile.
joffreyjaffeux tries the request and gets a 403 Forbidden error with a JSON response, indicating that the API is being reached. Massimo_Redaelli provides his response headers, which show a 404 Not Found error with an HTML response.
joffreyjaffeux points out that the Content-Type header is incorrect and suggests using the .json extension in the URL. Massimo_Redaelli confirms that this solves the issue. He also asks about updating a custom field and answers his own question by providing the correct JSON format: { "user_fields": { "the_id": "value" } }.
I suspect you are stopped before reaching the Discourse Api due to a session being lost between http://disc.uaar.it/ and https://www.uaar.it. Can’t help much, all I can tell you is to dig in this direction and the query I gave you is working.