Update user info
Update the user name (name) and avatar (avatarUrl) stored in the Nexconn messaging service.
tip
- The
nameandavatarUrlstored in Nexconn are used only for push notifications. Thenamefield is displayed as the default user name in mobile push notifications. Note: Changes made via/v4/user/updateare not automatically synced to user profiles managed through/v4/user/profile/set. To update user profile data, call/v4/user/profile/set. - Changes to
nameandavatarUrltake effect immediately. Push notifications display the updated user name. - User nicknames and avatars displayed in the app must be implemented on your side.
Request method
POST: https://Base URL/v4/user/update
Rate limit: 100 requests per second
Signature required: All server API requests require signature verification. See API request signature.
Request body
The request body is in application/json format and supports the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | String | Yes | The user ID. Supports uppercase and lowercase letters and numbers. Maximum 64 bytes. Must be unique within the app. |
name | String | No | User name. Maximum 64 characters. Used in push notifications. Omit to skip updating. |
avatarUrl | String | No | User avatar URI. Maximum 1024 bytes. |
Request example
HTTP
POST /v4/user/update HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: xxxxxxxxxxxxxxxx
Content-Type: application/json
{
"userId": "jlk456j5",
"name": "newname",
"avatarUrl": "http://abc.com/mynewportrait.jpg"
}
Response
The response body contains a JSON object with the following structure:
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{"code":0}