05/15/2024 15:19:45

Subscribe [ (Only WeChat channel supports it) ]

I. Get the message subscription list

1.1 Interface name

/v2/profile/subscribe_getlist

1.2 Request parameters

Parameter Type Description
openid string [Required] The unified account's unique identifier
token string [Required] token
page int [Optional] Page number, defaulted as 0
page_size int [Optional] Number of pieces per page, defaulted as 10

1.3 Return parameters

Parameter Type Description
ret int Return code; 0: correct; others: failed
msg string Detailed description of the return result
subscribe_list array Message subscription list
more bool Are there more lists? true: yes, false: no

1.4 Request example

  • Request
{
    "openid":"5058652921602482984",
    "token":"19_xBABCDoypXGNWsD0DS_Qp_ThLAJE8HaichHpIgT6PtWMM3-PMH-yB3KlVnyUjM8CsXjDpSu08rdKRoj-PxZ7k9Cv4AIIjZOJBN99FMG6ruM"
}
  • Response
{
    "subscribe_list":[],
    "more":false,
    "ret":0,
    "msg":"success"
}

Warning:

  1. Getting the subscribed message list will return all the subscribed topic configurations of the game, no matter whether a specific account is subscribed.
  2. New subscribers need to contact WeChat subscription product business's contact person for communication, please consult MSDK Assistant for specific contact persons

II. Batch subscription

2.1 Interface name

/v2/profile/subscribe_setlist

2.2 Request parameters

Parameter Type Description
openid string [Required] The user's unique identifier
token string [Required] The user's login status
op_type int [Required] operation type 0-subscribe, 1-cancel
msg_id array [Required] requested message ID list, such as [1,2,3]

2.3 Return parameters

Parameter Type Description
ret int Return code; 0: correct; others: failed
msg string Detailed description of the return result

2.4 Request example

  • Request
{
    "openid":"5058652921602482984",
    "token":"19_xBABCDoypXGNWsD0DS_Qp_ThLAJE8HaichHpIgT6PtWMM3-PMH-yB3KlVnyUjM8CsXjDpSu08rdKRoj-PxZ7k9Cv4AIIjZOJBN99FMG6ruM",
    "msg_id":[111,222],
    "op_type":0
}
  • Response
{
    "ret":0,
    "msg":"success"
}

III. Subscription push

3.1 Interface name

/v2/profile/subscribe_push

3.2 Request parameters

Parameter Type Description
openid string [Optional] the unified account's unique identifier
token string [Optional] token
msg_id int [Required] requested message ID, such as 123

3.3 Return parameters

Parameter Type Description
ret int Return code; 0: correct; others: failed
msg string Detailed description of the return result

3.4 Request example

  • Request
{
    "openid":"5058652921602482984",
    "token":"19_xBABCDoypXGNWsD0DS_Qp_ThLAJE8HaichHpIgT6PtWMM3-PMH-yB3KlVnyUjM8CsXjDpSu08rdKRoj-PxZ7k9Cv4AIIjZOJBN99FMG6ruM",
    "msg_id":123
}
  • Response
{
    "ret":0,
    "msg":"success"
}

IV. Subscription cleanup

4.1 Interface name

/v2/profile/subscribe_clear

4.2 Request parameters

Parameter Type Description
openid string [Optional] the unified account's unique identifier
token string [Optional]token
msg_id int [Required] requested message ID, such as 123

4.3 Return parameters

Parameter Type Description
ret int Return code; 0: correct; others: failed
msg string Detailed description of the return result

4.4 Request example

  • Request
{
    "openid":"5058652921602482984",
    "token":"19_xBABCDoypXGNWsD0DS_Qp_ThLAJE8HaichHpIgT6PtWMM3-PMH-yB3KlVnyUjM8CsXjDpSu08rdKRoj-PxZ7k9Cv4AIIjZOJBN99FMG6ruM",
    "msg_id":123
}
  • Response
{
    "ret":0,
    "msg":"success"
}

V. [Attached] Configuration of subscription message

WeChat Game Operation Management System

[info] After adding a message, click the "Test" button and then enter a QQ number to test it. After the test is successful, you can change the status of the message to "take effect". Now, you can push it.



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""