UpdateUserByPlayerID
Update contact information according to PlayerID.
POST /api/v4/userinfo/update_user_by_player_id
note
PlayerID refers to the business-defined unique identifier of a user. Before performing the update, verify that the obtained PlayerID is correct before proceeding, or the wrong information may be modified.
Request parameters
For more information on the query parameters, see Query parameters.
| Attribute | Data type | Remarks | Description |
|---|---|---|---|
| player_id | string | required | Business-defined unique player ID (up to 20 numeric characters) |
| modify_ts | bigint | required | Timestamp of last update (in milliseconds) |
| tags | []string | optional | Custom tags for the grouping of users, used in user segmentation:
|
| subscribe | int | optional | User subscription status. 1: Subscribed, 0: Unsubscribed, -1: Non-subscribed |
| location | string | optional | Three-digit country code, see number_code from Country or region informationIf the parameter is unknown or empty, the existing value will not be overwritten |
| language | string | optional | Language code, see language_code from Language informationIf the parameter is unknown or empty, the existing value will not be overwritten |
| attributes | object | optional | Custom user attribute. Supports updating other contact attributes, such as gender and birthday. Used in user segmentation, for the creation of personalized campaigns:
|
| preferences | []string | optional | Attribute to determine a contact's subscription groups, which can be used to classify subscribers based on interests and subscriber preferences. Used in user segmentation, for sending targeted emails to users with specific subscriber preferences:
|
| update_strategy | int | optional | Controls whether the subscribe field is updated, see Update strategy for more details. |
Request sample
curl --request POST "https://openapi.smartlink.intlgame.com/api/v4/userinfo/update_user_by_player_id?gameid=${GAME_ID}&seq=${YOUR_RANDOM_STRING}&sig=${SIGNATURE}&ts=${TS}" \
--header 'Content-Type: application/json' \
--data-raw '{
"player_id": "1012156612344364",
"modify_ts": 1691225447577,
"tags": [
"tag1","tag2"
],
"subscribe": 1,
"location": "004",
"language": "en",
"attributes": {
"nickname": "tang",
"level": "10",
"birthday":"1990-05-09 00:00:00+08:00",
"prop":["option1","option2"]
},
"preferences": [
"option1","option2"
]
}'
Response parameters
| Attribute | Data type | Description |
|---|---|---|
| code | int | Return code |
| msg | string | Return message |
Response sample
{
"code": 0,
"msg": "Success",
"seq": "{YOUR_RANDOM_STRING}"
}