Developers can use this API to get the automatic reply rules used by an Official Account, including automatic reply to new followers, automatic reply to messages (triggered once within 60 minutes), and automatic reply to keywords.
Notes:
- After the third-party platform developer authorizes the business of its Official Account to you, it can use this API to detect the automatic reply configuration of the Official Account.
- This API can only obtain the automatic reply rules set by Official Accounts in the automatic reply feature on the Official Accounts Platform, and cannot obtain the automatic reply rules developed by Official Accounts or by third-party platform developers.
- Verified/Unverified Service Accounts/Subscription Accounts and API test accounts all have access to this API.
- In terms of the Official Accounts login authorization mechanism of the third-party platform, the API belongs to the message and menu permission set.
- The images/voices/videos returned via this API are temporary assets (different temporary assets are obtained each time via the Media Asset Management > Get Temporary Assets API, which are valid for 3 days). The articles returned via this API are permanent assets (which are obtained via the Media Asset Management > Get Permanent Assets API).
API fequest format
HTTP request method: GET (use the HTTPS protocol)
https://api.weixin.qq.com/cgi-bin/get_current_autoreply_info?access_token=ACCESS_TOKEN
Response
Sample response in JSON format: (Note that unformatted JSON uses "" as the escape character)
{
"is_add_friend_reply_open": 1,
"is_autoreply_open": 1,
"add_friend_autoreply_info": {
"type": "text",
"content": "Thanks for your attention!"
},
"message_default_autoreply_info": {
"type": "text",
"content": "Hello, this is autoreply!"
},
"keyword_autoreply_info": {
"list": [
{
"rule_name": "autoreply-news",
"create_time": 1423028166,
"reply_mode": "reply_all",
"keyword_list_info": [
{
"type": "text",
"match_mode": "contain",
"content": "news test"//The content here refers to the keyword content
}
],
"reply_list_info": [
{
"type": "news",
"news_info": {
"list": [
{
"title": "it's news",
"author": "jim",
"digest": "it's digest",
"show_cover": 1, "cover_url": "http://mmbiz.qpic.cn/mmbiz/GE7et87vE9vicuCibqXsX9GPPLuEtBfXfKbE8sWdt2DDcL0dMfQWJWTVn1N8DxI0gcRmrtqBOuwQH
euPKmFLK0ZQ/0",
"content_url": "http://mp.weixin.qq.com/s?__biz=MjM5ODUwNTM3Ng==&mid=203929886&idx=1&sn=628f964cf0c6d84c026881b6959aea8b#rd",
"source_url": "http://www.url.com"
}
]
}
},
{
"type": "news",
"content":"KQb_w_Tiz-nSdVLoTV35Psmty8hGBulGhEdbb9SKs-o",
"news_info": {
"list": [
{
"title": "MULTI_NEWS",
"author": "JIMZHENG",
"digest": "text",
"show_cover": 0,
"cover_url": "http://mmbiz.qpic.cn/mmbiz/GE7et87vE9vicuCibqXsX9GPPLuEtBfXfK0HKuBIa1A1cypS0uY1wickv70iaY1gf3I1DTszuJoS3lAVLv
hTcm9sDA/0",
"content_url": "http://mp.weixin.qq.com/s?__biz=MjM5ODUwNTM3Ng==&mid=204013432&idx=1&sn=80ce6d9abcb832237bf86c87e50fda15#rd",
"source_url": ""
},
{
"title": "MULTI_NEWS4",
"author": "JIMZHENG",
"digest": "MULTI_NEWSMULTI_NEWSMULTI_NEWSMULTI_NEWSMULTI_NEWSMULT",
"show_cover": 1,
"cover_url": "http://mmbiz.qpic.cn/mmbiz/GE7et87vE9vicuCibqXsX9GPPLuEtBfXfKbE8sWdt2DDcL0dMfQWJWTVn1N8DxI0gcRmrtqBOuwQ
HeuPKmFLK0ZQ/0",
"content_url": "http://mp.weixin.qq.com/s?__biz=MjM5ODUwNTM3Ng==&mid=204013432&idx=5&sn=b4ef73a915e7c2265e437096582774af#rd",
"source_url": ""
}
]
}
}
]
},
{
"rule_name": "autoreply-voice",
"create_time": 1423027971,
"reply_mode": "random_one",
"keyword_list_info": [
{
"type": "text",
"match_mode": "contain",
"content": "voice test"
}
],
"reply_list_info": [
{
"type": "voice",
"content": "NESsxgHEvAcg3egJTtYj4uG1PTL6iPhratdWKDLAXYErhN6oEEfMdVyblWtBY5vp"
}
]
},
{
"rule_name": "autoreply-text",
"create_time": 1423027926,
"reply_mode": "random_one",
"keyword_list_info": [
{
"type": "text",
"match_mode": "contain",
"content": "text"
}
],
"reply_list_info": [
{
"type": "text",
"content": "hello!text!"
}
]
},
{
"rule_name": "autoreply-video",
"create_time": 1423027801,
"reply_mode": "random_one",
"keyword_list_info": [
{
"type": "text",
"match_mode": "equal",
"content": "video test"
}
],
"reply_list_info": [
{
"type": "video",
"content": "http://61.182.133.153/vweixinp.tc.qq.com/1007_114bcede9a2244eeb5ab7f76d951df5f.f10.mp4?vkey=7183E5C952B16C3AB1991BA8138673DE1037CB82A29801A504B64A77F691BF9DF7AD054A9B7FE683&sha=0&save=1"
}
]
}
]
}
}
Parameters
Parameter | Description |
---|---|
is_add_friend_reply_open | Indicates whether the automatic reply to new followers is enabled. 0: Disabled; 1: Enabled |
is_autoreply_open | Indicates whether the automatic reply to messages is enabled. 0: Disabled; 1: Enabled |
add_friend_autoreply_info | Information of the automatic reply to new followers |
type | Automatic reply type. The types of automatic reply to new followers and automatic reply to messages support text (parameter = "text"), image (parameter = "img"), voice (parameter = "voice"), and video (parameter = "video"), while those of automatic reply to keywords also include article (parameter = "news") in addition to the above types. |
content | For text replies, "content" is the text content, and for article, image, voice, and video replies, "content" is the mediaID. |
message_default_autoreply_info | Information of the automatic reply to messages |
keyword_autoreply_info | Information of the automatic reply to keywords |
rule_name | Rule name |
create_time | Creation time |
reply_mode | Reply mode. "reply_all": Use all modes; "random_one": Use one of the modes |
keyword_list_info | The list of matched keywords |
match_mode | Match mode. "contain" means the message contains the keyword, and "equal" means the message content must be identical to the keyword. |
news_info | Article information |
title | The article's title |
digest | Summary |
author | The author |
show_cover | Indicates whether to display the cover. 0: False; 1 True |
cover_url | Cover image URL |
content_url | Text URL |
source_url | Original text URL. The "Read More" entry is not displayed when this is left empty. |