Skip to main content

AddPreferencesByOpenID

Add subscriber preferences to contacts according to OpenID. Ensure that imported subscriber preferences have been created in SmartLink > Contacts > Preferences. Content that contacts are interested in can be pushed, based on their preferences.

POST /api/v3/userinfo/add_preferences_by_openid

Request parameters

For more information on the query parameters, see Query parameters.

AttributeData typeRemarksDescription
openidstringrequiredUnique user ID (up to 20 numeric characters)
modify_tsbigintrequiredTimestamp of last update (in milliseconds)
preferences[]stringrequiredAttribute 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:
  • Ensure the imported subscriber preferences have been created in SmartLink > Contacts > Preferences, else the update will fail.
  • The lastest subscriber preferences set by the user will take precedence, and is not affected by the user subscription status.
  • Each user can have up to 20 subscription groups selected.
  • Preferences can only be added, existing preferences will not be overwritten.

Request sample

curl --request POST "https://openapi.smartlink.intlgame.com/api/v3/userinfo/add_preferences_by_openid?gameid=${GAME_ID}&seq=${YOUR_RANDOM_STRING}&sig=${SIGNATURE}&ts=${TS}" \
--header 'Content-Type: application/json' \
--data-raw '{
"openid": "1012156612344364",
"modify_ts": 1691225447577,
"preferences": [
"option1",
"option2"
]
}'

Response parameters

AttributeData typeDescription
codeintReturn code
msgstringReturn message

Response sample

{
"code": 0,
"msg": "Success",
"seq": "{YOUR_RANDOM_STRING}"
}