humhub / rest

HumHub Rest API Module
24 stars 24 forks source link

Update User #166

Open buzzzo opened 4 months ago

buzzzo commented 4 months ago

Hi

What is the EXACT syntax to update user ? Do we specify all the payload or could we just specify one field ?

Could someone post an example with a curl call ?

I'm just trying something like: json='{"profile": {"mobile": "123456"}}'

curl https://x.y.z.j/api/v1/user/4 -H "Accept: application/json" -H "Authorization: Bearer $token" -d '$json' --request PUT

but i've receive:

"code":500,"message":"Internal error while save user!"}

Thx

Reuns commented 2 months ago

I'm also interested. I tried to update a few profile fields and I don't have any error message. I have for answer just the content of the user information, but no change are made.