SmartLink API
SmartLink API supports importing contacts into SmartLink and updating user information. For information about each API, more details can be found in the sidebar.
For more information about the production environment, contact SmartLink_service@proximabeta.com.
For more information about importing contacts, see SyncUserByEmail.
Basic structure
- Protocol: HTTP/HTTPS
- Character encoding: UTF-8
- API restrictions: Supports being called from backend or the web, reach out to the SmartLink representative to add your domain name to the allowlist if you wish to enable API functions for web.
SmartLink APIs are recommended to be called from your project's backend, after verifying that the user information has been entered correctly, to ensure that the parameters being sent to the SmartLink API are valid.
URL format
The standard URL format of an HTTP API request is:
https://openapi.smartlink.intlgame.com/api/v3/report/login?gameid=11&seq=abcdefg&sig=xxx
\____________________________________/\__________________/ \___________________________/
server URL endpoint path query parameters
Query parameters
Query parameters are placed after the URL, and parameters of specific API protocols are placed in the POST body in JSON format. In order to ensure signature consistency, sig
should be placed after all other query parameters.
Attribute | Data type | Remarks | Description |
---|---|---|---|
gameid | int | required | Project ID centrally assigned by IEGG, can be retrieved from SmartLink console in My project under Project info |
seq | string | optional | Pass-through parameters. The returned JSON will contain such pass-through parameters for asynchronous use by the caller. Can only consist of alphanumeric characters and underscores. Empty by default. |
ts | uint | required | Standard unix timestamp (seconds) |
sig | string | required | Signature |
Signature
sig = md5 (path + "?" + params + body + API key)
- path: HTTP path of the API excluding the domain, such as
/api/v3/report/login
. - params: Query parameters of the API excluding
sig
, parameters sorted in ascending ASCII order and concatenated using the "&" symbol, such asgameid=1&seq=abcdefg
. - body: JSON string, may contain line breaks, such as
{"data":{"msg":"abcd"}}
. - API key: API key obtained from SmartLink, see Manage API keys for more details.
Sample query parameters
Param | Values |
---|---|
gameid | 30123 |
seq | seq_test_str |
ts | 1694920114 |
sig | 253b34340520237319cf5d125a72e90d |
GAME_ID=30123
YOUR_RANDOM_STRING=seq_test_str
SIGNATURE=253b34340520237319cf5d125a72e90d
TS=1694920114
curl --request POST "https://openapi.smartlink.intlgame.com/api/v3/report/login?gameid=${GAME_ID}&seq=${YOUR_RANDOM_STRING}&ts=${TS}&sig=${SIGNATURE}" \
--header 'Content-Type: application/json' \
--data-raw '{
"login_time": 1694917726,
"openid": "5450588341569",
"location": "004",
"language": "ar",
"level":4
}'
Return code
Code | Description |
---|---|
0 | Request successful |
10001 | Invalid gameid |
10002 | Invalid ts, timestamp in seconds |
10003 | Signature error |
10004 | Unsupported source |
10005 | Invalid seq, can only consist of alphanumeric characters and underscores |
10006 | Invalid request parameter JSON |
10024 | Form API not added to allowlist |
11001 | email cannot be empty |
11002 | email length exceeds limit of 255 characters |
11003 | Invalid email format |
11004 | Email address not authenticated |
11005 | Contacts uploaded in bulk out of range, between 0 and 200 (for BatchSyncUserByEmail only) |
12001 | openid cannot be empty |
12002 | Invalid openid, length cannot exceed 20 numeric characters |
12003 | LI PASS preregistration failed, openid preregistered with another email |
12004 | LI PASS preregistration failed, openid already linked to email |
13001 | Source cannot be empty |
13002 | Source character length exceeds limit |
13003 | Source character is not available |
13004 | Source exceeds cumulative limit |
13005 | Unsupported source |
14001 | Subscription status is invalid |
14002 | Subscription status cannot be empty |
14003 | Subscription status is set and cannot be updated to not set |
14004 | Subscription status cannot be modified, current status is pending |
15001 | Country invalid |
15002 | Country cannot be empty |
16001 | Language invalid |
16002 | Language cannot be empty |
17001 | Invalid tags, not created in SmartLink |
17002 | Tags exceed cumulative limit |
18001 | Invalid custom attribute name, not created in SmartLink |
18002 | Custom attribute int type value error, between -9223372036854775808 and 9223372036854775807 |
18003 | Custom attribute string type value error, cannot exceed 1000 characters |
18004 | Custom attribute datetime type value error, formatted as 2001-03-31+08:00 or 2001-03-31 00:00:00+08:00 |
18005 | Custom attribute exceeds cumulative limit of 50 |
18006 | Custom attribute value cannot be empty |
18007 | Custom attribute drop down type value format invalid, value is []string |
19001 | Invalid preferences, not created in SmartLink |
19002 | Preferences cannot be empty |
19003 | Preferences exceed cumulative limit of 20 |
20001 | Update time invalid, timestamp in milliseconds |
20002 | Update time cannot be earlier than last update |
20003 | Online time cannot be greater than or equal to 86,400 seconds |
21001 | money_cn cannot be less than 0 |
21002 | money_source cannot be less than 0 |
21003 | money_us cannot be less than or equal to 0 |
22010 | report is not open |
40001 | User does not exist |
50001 | Server internal error |
50002 | Server internal error |
50003 | Server internal error |
50004 | Server internal error |
50005 | Server internal error |
50006 | Server internal error |
60001 | LI PASS preregistration is not enabled |
60002 | LI PASS already preregistered |
60003 | Registration form is invalid or does not exist |
70001 | Transactional email domain not configured |
70002 | Transactional email template not configured |
70003 | Transactional email template variable json error |
70004 | Transactional email template variable exceeds limit |
70005 | Transactional email template variable does not exist |
70006 | Transactional email template variable missing |
70007 | Transactional email template variable format error |
70008 | Transactional email daily limit reached |
70009 | Transaction email sending anti shake, same sig cannot be requested repeatedly within one second |
Language information
Code | Language |
---|---|
ar | Arabic |
cs | Czech |
de | German |
en | English |
en-GB | English (United Kingdom) |
en-US | English (United States) |
es | Spanish |
es-MX | Spanish (Mexico) |
fi | Finnish |
fil-PH | Filipino |
fr | French |
hi | Hindi |
id | Indonesian |
it | Italian |
ja | Japanese |
ko | Korean |
ms | Malay |
nl | Dutch |
pl | Polish |
pt | Portuguese |
pt-BR | Portuguese (Brazil) |
ru | Russian |
th | Thai |
tr | Turkish |
ur | Urdu |
uz | Uzbek |
vi | Vietnamese |
zh-Hans | Chinese (Simplified) |
zh-Hant | Chinese (Hong Kong Traditional) |
zh-TW | Chinese (Taiwan Traditional) |
Country or region information
cn_name | en_name | country_two_digit_code | country_three_digit_code | number_code |
---|---|---|---|---|
阿富汗 | Afghanistan | AF | AFG | 004 |
奥兰群岛 | Åland Islands | AX | ALA | 248 |
阿尔巴尼亚 | Albania | AL | ALB | 008 |
阿尔及利亚 | Algeria | DZ | DZA | 012 |
美属萨摩亚 | American Samoa | AS | ASM | 016 |
安道尔 | Andorra | AD | AND | 020 |
安哥拉 | Angola | AO | AGO | 024 |
安圭拉 | Anguilla | AI | AIA | 660 |
南极洲 | Antarctica | AQ | ATA | 010 |
安提瓜和巴布达 | Antigua and Barbuda | AG | ATG | 028 |
阿根廷 | Argentina | AR | ARG | 032 |
亚美尼亚 | Armenia | AM | ARM | 051 |
阿鲁巴 | Aruba | AW | ABW | 533 |
澳大利亚 | Australia | AU | AUS | 036 |
奥地利 | Austria | AT | AUT | 040 |
阿塞拜疆 | Azerbaijan | AZ | AZE | 031 |
巴哈马 | Bahamas | BS | BHS | 044 |
巴林 | Bahrain | BH | BHR | 048 |
孟加拉国 | Bangladesh | BD | BGD | 050 |
巴巴多斯 | Barbados | BB | BRB | 052 |
白俄罗斯 | Belarus | BY | BLR | 112 |
比利时 | Belgium | BE | BEL | 056 |
伯利兹 | Belize | BZ | BLZ | 084 |
贝宁 | Benin | BJ | BEN | 204 |
百慕大 | Bermuda | BM | BMU | 060 |
不丹 | Bhutan | BT | BTN | 064 |
玻利维亚 | Bolivia (Plurinational State of) | BO | BOL | 068 |
博内尔 | Bonaire, Sint Eustatius and Saba | BQ | BES | 535 |
波斯尼亚和黑塞哥维那 | Bosnia and Herzegovina | BA | BIH | 070 |
博茨瓦那 | Botswana | BW | BWA | 072 |
布韦岛 | Bouvet Island | BV | BVT | 074 |
巴西 | Brazil | BR | BRA | 076 |
英属印度洋领地 | British Indian Ocean Territory | IO | IOT | 086 |
文莱 | Brunei Darussalam | BN | BRN | 096 |
保加利亚 | Bulgaria | BG | BGR | 100 |
布基纳法索 | Burkina Faso | BF | BFA | 854 |
布隆迪 | Burundi | BI | BDI | 108 |
佛得角 | Cabo Verde | CV | CPV | 132 |
柬埔寨 | Cambodia | KH | KHM | 116 |
喀麦隆 | Cameroon | CM | CMR | 120 |
加拿大 | Canada | CA | CAN | 124 |
开曼群岛 | Cayman Islands | KY | CYM | 136 |
中非 | Central African Republic | CF | CAF | 140 |
乍得 | Chad | TD | TCD | 148 |
智利 | Chile | CL | CHL | 152 |
中国 | China | CN | CHN | 156 |
圣诞岛 | Christmas Island | CX | CXR | 162 |
科科斯(基林)群岛 | Cocos (Keeling) Islands | CC | CCK | 166 |
哥伦比亚 | Colombia | CO | COL | 170 |
科摩罗 | Comoros | KM | COM | 174 |
刚果共和国 | Congo | CG | COG | 178 |
刚果 (刚果民主共和国) | Congo (Democratic Republic of the) | CD | COD | 180 |
库克群岛 | Cook Islands | CK | COK | 184 |
哥斯达黎加 | Costa Rica | CR | CRI | 188 |
科特迪瓦 | Côte d'Ivoire | CI | CIV | 384 |
克罗地亚 | Croatia | HR | HRV | 191 |
库拉索 | Curaçao | CW | CUW | 531 |
塞浦路斯 | Cyprus | CY | CYP | 196 |
捷克 | Czechia | CZ | CZE | 203 |
丹麦 | Denmark | DK | DNK | 208 |
吉布提 | Djibouti | DJ | DJI | 262 |
多米尼克 | Dominica | DM | DMA | 212 |
多米尼加 | Dominican Republic | DO | DOM | 214 |
厄瓜多尔 | Ecuador | EC | ECU | 218 |
埃及 | Egypt | EG | EGY | 818 |
萨尔瓦多 | El Salvador | SV | SLV | 222 |
赤道几内亚 | Equatorial Guinea | GQ | GNQ | 226 |
厄立特里亚 | Eritrea | ER | ERI | 232 |
爱沙尼亚 | Estonia | EE | EST | 233 |
斯威士兰 | Eswatini | SZ | SWZ | 748 |
埃塞俄比亚 | Ethiopia | ET | ETH | 231 |
福克兰群岛(马尔维纳斯) | Falkland Islands (Malvinas) | FK | FLK | 238 |
法罗群岛 | Faroe Islands | FO | FRO | 234 |
斐济 | Fiji | FJ | FJI | 242 |
芬兰 | Finland | FI | FIN | 246 |
法国 | France | FR | FRA | 250 |
法属圭亚那 | French Guiana | GF | GUF | 254 |
法属波利尼西亚 | French Polynesia | PF | PYF | 258 |
法国南部领地 | French Southern Territories | TF | ATF | 260 |
加蓬 | Gabon | GA | GAB | 266 |
冈比亚 | Gambia | GM | GMB | 270 |
格鲁吉亚 | Georgia | GE | GEO | 268 |
德国 | Germany | DE | DEU | 276 |
加纳 | Ghana | GH | GHA | 288 |
直布罗陀 | Gibraltar | GI | GIB | 292 |
希腊 | Greece | GR | GRC | 300 |
格陵兰 | Greenland | GL | GRL | 304 |
格林纳达 | Grenada | GD | GRD | 308 |
瓜德罗普 | Guadeloupe | GP | GLP | 312 |
关岛 | Guam | GU | GUM | 316 |
危地马拉 | Guatemala | GT | GTM | 320 |
根西 | Guernsey | GG | GGY | 831 |
几内亚 | Guinea | GN | GIN | 324 |
几内亚比绍 | Guinea-Bissau | GW | GNB | 624 |
圭亚那 | Guyana | GY | GUY | 328 |
海地 | Haiti | HT | HTI | 332 |
赫德岛和麦克唐纳群岛 | Heard Island and McDonald Islands | HM | HMD | 334 |
梵蒂冈 | Holy See | VA | VAT | 336 |
洪都拉斯 | Honduras | HN | HND | 340 |
香港 | Hong Kong | HK | HKG | 344 |
匈牙利 | Hungary | HU | HUN | 348 |
冰岛 | Iceland | IS | ISL | 352 |
印度 | India | IN | IND | 356 |
印尼 | Indonesia | ID | IDN | 360 |
伊拉克 | Iraq | IQ | IRQ | 368 |
爱尔兰 | Ireland | IE | IRL | 372 |
马恩岛 | Isle of Man | IM | IMN | 833 |
以色列 | Israel | IL | ISR | 376 |
意大利 | Italy | IT | ITA | 380 |
牙买加 | Jamaica | JM | JAM | 388 |
日本 | Japan | JP | JPN | 392 |
泽西 | Jersey | JE | JEY | 832 |
约旦 | Jordan | JO | JOR | 400 |
哈萨克斯坦 | Kazakhstan | KZ | KAZ | 398 |
肯尼亚 | Kenya | KE | KEN | 404 |
基里巴斯 | Kiribati | KI | KIR | 296 |
大韩(民国) | Korea (Republic of) | KR | KOR | 410 |
科威特 | Kuwait | KW | KWT | 414 |
吉尔吉斯斯坦 | Kyrgyzstan | KG | KGZ | 417 |
老挝 | Lao People's Democratic Republic | LA | LAO | 418 |
拉脱维亚 | Latvia | LV | LVA | 428 |
黎巴嫩 | Lebanon | LB | LBN | 422 |
莱索托 | Lesotho | LS | LSO | 426 |
利比里亚 | Liberia | LR | LBR | 430 |
利比亚 | Libya | LY | LBY | 434 |
列支敦士登 | Liechtenstein | LI | LIE | 438 |
立陶宛 | Lithuania | LT | LTU | 440 |
卢森堡 | Luxembourg | LU | LUX | 442 |
澳门 | Macau | MO | MAC | 446 |
马达加斯加 | Madagascar | MG | MDG | 450 |
马拉维 | Malawi | MW | MWI | 454 |
马来西亚 | Malaysia | MY | MYS | 458 |
马尔代夫 | Maldives | MV | MDV | 462 |
马里 | Mali | ML | MLI | 466 |
马耳他 | Malta | MT | MLT | 470 |
马绍尔群岛 | Marshall Islands | MH | MHL | 584 |
马提尼克 | Martinique | MQ | MTQ | 474 |
毛里塔尼亚 | Mauritania | MR | MRT | 478 |
毛里求斯 | Mauritius | MU | MUS | 480 |
马约特 | Mayotte | YT | MYT | 175 |
墨西哥 | Mexico | MX | MEX | 484 |
密克罗尼西亚(联邦) | Micronesia (Federated States of) | FM | FSM | 583 |
摩尔多瓦 | Moldova (Republic of) | MD | MDA | 498 |
摩纳哥 | Monaco | MC | MCO | 492 |
蒙古 | Mongolia | MN | MNG | 496 |
黑山 | Montenegro | ME | MNE | 499 |
蒙特塞拉特 | Montserrat | MS | MSR | 500 |
摩洛哥 | Morocco | MA | MAR | 504 |
莫桑比克 | Mozambique | MZ | MOZ | 508 |
缅甸 | Myanmar | MM | MMR | 104 |
纳米比亚 | Namibia | NA | NAM | 516 |
瑙鲁 | Nauru | NR | NRU | 520 |
尼泊尔 | Nepal | NP | NPL | 524 |
荷兰 | Netherlands | NL | NLD | 528 |
新喀里多尼亚 | New Caledonia | NC | NCL | 540 |
新西兰 | New Zealand | NZ | NZL | 554 |
尼加拉瓜 | Nicaragua | NI | NIC | 558 |
尼日尔 | Niger | NE | NER | 562 |
尼日利亚 | Nigeria | NG | NGA | 566 |
纽 | Niue | NU | NIU | 570 |
诺福克岛 | Norfolk Island | NF | NFK | 574 |
北马其顿 | North Macedonia | MK | MKD | 807 |
北马里亚纳群岛 | Northern Mariana Islands | MP | MNP | 580 |
挪威 | Norway | NO | NOR | 578 |
阿曼 | Oman | OM | OMN | 512 |
巴基斯坦 | Pakistan | PK | PAK | 586 |
帕劳 | Palau | PW | PLW | 585 |
巴勒斯坦 | Palestine, State of | PS | PSE | 275 |
巴拿马 | Panama | PA | PAN | 591 |
巴布亚新几內亚 | Papua New Guinea | PG | PNG | 598 |
巴拉圭 | Paraguay | PY | PRY | 600 |
秘鲁 | Peru | PE | PER | 604 |
菲律宾 | Philippines | PH | PHL | 608 |
皮特凯恩群岛 | Pitcairn | PN | PCN | 612 |
波兰 | Poland | PL | POL | 616 |
葡萄牙 | Portugal | PT | PRT | 620 |
波多黎各 | Puerto Rico | PR | PRI | 630 |
卡塔尔 | Qatar | QA | QAT | 634 |
留尼汪 | Réunion | RE | REU | 638 |
罗马尼亚 | Romania | RO | ROU | 642 |
俄罗斯 | Russian Federation | RU | RUS | 643 |
卢旺达 | Rwanda | RW | RWA | 646 |
圣巴泰勒米 | Saint Barthélemy | BL | BLM | 652 |
圣卢西亚 | Saint Helena, Ascension and Tristan da Cunha | SH | SHN | 654 |
圣基茨和尼维斯 | Saint Kitts and Nevis | KN | KNA | 659 |
圣卢西亚 | Saint Lucia | LC | LCA | 662 |
法属圣马丁 | Saint Martin (French part) | MF | MAF | 663 |
圣皮埃尔和密克隆 | Saint Pierre and Miquelon | PM | SPM | 666 |
圣文森特和格林纳丁斯 | Saint Vincent and the Grenadines | VC | VCT | 670 |
萨摩亚 | Samoa | WS | WSM | 882 |
圣马力诺 | San Marino | SM | SMR | 674 |
圣多美和普林西比 | Sao Tome and Principe | ST | STP | 678 |
沙特阿拉伯 | Saudi Arabia | SA | SAU | 682 |
塞内加尔 | Senegal | SN | SEN | 686 |
塞尔维亚 | Serbia | RS | SRB | 688 |
塞舌尔 | Seychelles | SC | SYC | 690 |
塞拉利昂 | Sierra Leone | SL | SLE | 694 |
新加坡 | Singapore | SG | SGP | 702 |
荷属圣马丁 | Sint Maarten (Dutch part) | SX | SXM | 534 |
斯洛伐克 | Slovakia | SK | SVK | 703 |
斯洛文尼亚 | Slovenia | SI | SVN | 705 |
所罗门群岛 | Solomon Islands | SB | SLB | 090 |
索马里 | Somalia | SO | SOM | 706 |
南非 | South Africa | ZA | ZAF | 710 |
南乔治亚和南桑威奇群岛 | South Georgia and the South Sandwich Islands | GS | SGS | 239 |
南苏丹 | South Sudan | SS | SSD | 728 |
西班牙 | Spain | ES | ESP | 724 |
斯里兰卡 | Sri Lanka | LK | LKA | 144 |
苏丹 | Sudan | SD | SDN | 729 |
苏里南 | Suriname | SR | SUR | 740 |
斯瓦尔巴和扬马延岛 | Svalbard and Jan Mayen | SJ | SJM | 744 |
瑞典 | Sweden | SE | SWE | 752 |
瑞士 | Switzerland | CH | CHE | 756 |
台湾 | Taiwan | TW | TWN | 158 |
塔吉克斯坦 | Tajikistan | TJ | TJK | 762 |
坦桑尼亚 | Tanzania, United Republic of | TZ | TZA | 834 |
泰国 | Thailand | TH | THA | 764 |
东帝汶 | Timor-Leste | TL | TLS | 626 |
多哥 | Togo | TG | TGO | 768 |
托克劳 | Tokelau | TK | TKL | 772 |
汤加 | Tonga | TO | TON | 776 |
特立尼达和多巴哥 | Trinidad and Tobago | TT | TTO | 780 |
突尼斯 | Tunisia | TN | TUN | 788 |
土耳其 | Türkiye | TR | TUR | 792 |
土库曼斯坦 | Turkmenistan | TM | TKM | 795 |
特克斯和凯科斯群岛 | Turks and Caicos Islands | TC | TCA | 796 |
图瓦卢 | Tuvalu | TV | TUV | 798 |
乌干达 | Uganda | UG | UGA | 800 |
乌克兰 | Ukraine | UA | UKR | 804 |
阿联酋 | United Arab Emirates | AE | ARE | 784 |
英国 | United Kingdom of Great Britain and Northern Ireland | GB | GBR | 826 |
美国 | United States of America | US | USA | 840 |
乌拉圭 | Uruguay | UY | URY | 858 |
乌兹别克斯坦 | Uzbekistan | UZ | UZB | 860 |
瓦努阿图 | Vanuatu | VU | VUT | 548 |
委内瑞拉 | Venezuela (Bolivarian Republic of) | VE | VEN | 862 |
越南 | Viet Nam | VN | VNM | 704 |
英属维尔京群岛 | Virgin Islands (British) | VG | VGB | 092 |
美属维尔京群岛 | Virgin Islands (U.S.) | VI | VIR | 850 |
瓦利斯和富图纳 | Wallis and Futuna | WF | WLF | 876 |
西撒哈拉 | Western Sahara | EH | ESH | 732 |
也门 | Yemen | YE | YEM | 887 |
赞比亚 | Zambia | ZM | ZMB | 894 |
津巴布韦 | Zimbabwe | ZW | ZWE | 716 |
未知区域 | UNKNOWN | none | (null) | 999 |
欧盟 | European Union | EU | (null) | 998 |
美国本土外小岛屿 | United States Minor Outlying Islands | UM | UMI | 581 |
User info
Attribute | Data type | Description |
---|---|---|
string | ||
openid | string | Unique user ID (up to 20 numeric characters) |
source | []string | User data source. Determines the exact source when data is updated from multiple sources, for segmentation in contact management and analytics in SmartLink:
|
subscribe | int | 1: Subscribed 0: Unsubscribed -1: Non-subscribed |
location | string | Three-digit country code, see number_code from Country or region information. |
language | string | Language code, see language_code from Language information. |
tags | []string | Custom tags for the grouping of users, used in user segmentation:
|
attributes | object | 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 | 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:
|