Skip to main content

Update user info

Update the user name (name) and avatar (avatarUrl) stored in the Nexconn messaging service.

tip
  • The name and avatarUrl stored in Nexconn are used only for push notifications. The name field is displayed as the default user name in mobile push notifications. Note: Changes made via /v4/user/update are not automatically synced to user profiles managed through /v4/user/profile/set. To update user profile data, call /v4/user/profile/set.
  • Changes to name and avatarUrl take 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:

ParameterTypeRequiredDescription
userIdStringYesThe user ID. Supports uppercase and lowercase letters and numbers. Maximum 64 bytes. Must be unique within the app.
nameStringNoUser name. Maximum 64 characters. Used in push notifications. Omit to skip updating.
avatarUrlStringNoUser 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:

FieldTypeDescription
codeNumberStatus code. 0 indicates success.

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"code":0}