# Get automatic response rules
Interface should be called on the server side, not in the front end (Weixin Mini Program, web pages, APP, etc.) directly called, specific reference interface call guide
Interface name: getCurrentAutoreplyInfo
Gets Official Account the auto-reply rules currently used, including post-attention auto-reply, message auto-reply, and key word auto-reply
- Third Party Platform The developer can test the Official Account message template's auto-reply configuration through this interface immediately after the business is authorized to you by Official Account.
- This interface can only obtain the auto-reply rules set by Official Account in the auto-reply function of the official website of the Official Account. If the Official Account message template is developed by itself or implemented by Third Party Platform, it cannot be obtained.
- The authenticated / unauthenticated Service Account / subscription number, as well as the interface test number, have the interface permissions.
- In terms of Third Party Platform's Official Account login authorization mechanism, this interface belongs to the message and menu permission set.
- Images / Voices / Videos returned in this interface are temporary materials (temporary materials are different each time they are retrieved and are valid for 3 days. These materials are obtained through the Content Management - Getting temporary materials interface). The visual message returned by this interface is a permanent material item (which is obtained through the Material Management - Getting Permanent Material Interface).
# 1. How to call
# HTTPS calls
GET https://api.weixin.qq.com/cgi-bin/get_current_autoreply_info?access_token=ACCESS_TOKEN
# Cloud Calls
- This interface does not support cloud calls
# Third party invocation
This interface supports Third Party Platform generation business call.
The permissions set to which this interface belongs are: 1, 3, 15
When a service provider is authorized by one of the permissions set, it can call on behalf of the merchant by using authorizer_access_token , which can be viewed in the third-party call documentation.
# 2. Request parameters
# Query parametersQuery String parameters
Parameter Name | type | Required to fill in | Introductions |
---|---|---|---|
access_token | string | yes | Interface invocation credentials, using access_token , authorizer_access_token |
# Request BodyRequest Payload
nothing
# 3. Return Parameters
# Response Payload
Parameter Name | type | Introductions |
---|---|---|
is_add_friend_reply_open | number | Whether the automatic response after interest is turned on (0 - not turned on 1 - turned on) |
is_autoreply_open | number | Whether the message automatic response is turned on (0 - not turned on 1 - turned on) |
add_friend_autoreply_info | object | Information automatically responded to after you followed up |
message_default_autoreply_info | object | Information for automatically responding to messages |
keyword_autoreply_info | object | Keywords automatically respond to information |
# Res.add_friend_autoreply_infoObject Payload
Information automatically responded to after you followed up
Parameter Name | type | Example | Introductions | to enumerate |
---|---|---|---|---|
type | string | text | Type of automatic response.Post-follow automatic reply and message automatic reply types only support text, pictures (img, voice, and video (video, while keyword automatic reply also has news). | text img voice video news |
content | string | Sample text | For text types, content is text content, and for graphic, picture, voice, video types, content is mediaID | - |
# Res.message_default_autoreply_infoObject Payload
Information for automatically responding to messages
Parameter Name | type | Example | Introductions | to enumerate |
---|---|---|---|---|
type | string | text | Type of automatic response.Post-follow automatic reply and message automatic reply types only support text, pictures (img, voice, and video (video, while keyword automatic reply also has news). | text img voice video news |
content | string | Sample text | For text types, content is text content, and for graphic, picture, voice, video types, content is mediaID | - |
# Res.keyword_autoreply_infoObject Payload
Keywords automatically respond to information
Parameter Name | type | Introductions |
---|---|---|
list | objarray | List of automatic responses |
# Res.keyword_autoreply_info.list(Array)Object Payload
List of automatic responses
Parameter Name | type | Introductions |
---|---|---|
rule_name | string | Rules Name |
create_time | number | Created time |
reply_mode | string | Reply mode, reply_all represents all replies, and random_one represents a random reply to one of them. |
keyword_list_info | objarray | List of matching keywords |
reply_list_info | objarray | List of replies |
# Res.keyword_autoreply_info.list(Array).keyword_list_infoObject Payload
List of matching keywords
Parameter Name | type | Example | Introductions | to enumerate |
---|---|---|---|---|
type | string | text | Type of automatic response.The following auto-reply and message auto-reply types only support text, picture (img), voice (video), video (video)) | text img voice video |
content | string | Sample text | For text types, content is text content, and for graphic, picture, voice, video types, content is mediaID | - |
match_mode | string | contain | Matching pattern, contain on behalf of the message contains the keyword can, equal that the message content must be strictly the same as the keyword | - |
# Res.keyword_autoreply_info.list(Array).reply_list_infoObject Payload
List of replies
Parameter Name | type | Example | Introductions | to enumerate |
---|---|---|---|---|
type | string | text | Type of automatic response.Post-follow automatic reply and message automatic reply types only support text, pictures (img, voice, and video (video, while keyword automatic reply also has news). | text img voice video news |
content | string | Sample text | For text types, content is text content, and for graphic, picture, voice, video types, content is mediaID | - |
news_info | object | - | Information about the text message | - |
# Res.keyword_autoreply_info.list(Array).reply_list_info.news_infoObject Payload
Information about the text message
Parameter Name | type | Introductions |
---|---|---|
list | objarray | Graphic message list |
# Res.keyword_autoreply_info.list(Array).reply_list_info.news_info.listObject Payload
Graphic message list
Parameter Name | type | Introductions |
---|---|---|
title | string | Graphic message title |
digest | string | abstract |
author | string | Author |
show_cover | number | Show the cover or not, 0 is not shown, 1 is shown |
cover_url | string | URL |
content_url | string | URL of the text |
source_url | string | The original URL, if left blank, there is no view of the original entry |
# 4. Note
There are no special considerations for this interface
# 5. Code examples
Example Requests
{}
Return an example
{
"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测试"//此处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测试"
}
],
"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测试"
}
],
"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"
}
]
}
]
}
}
# 6. Error code
The following is a list of error codes for this interface, other error codes can refer to General error codes
Error code | Error Description | Solutions |
---|---|---|
0 | Ok or in a normal state | OK means to go from abnormal to normal in a normal state |
# 7. Scope of application
Official Account | Service Account |
---|---|
✔ | ✔ |
- ✔: The account can call this interface
- Other account types that are not expressly stated may not be called on this interface without special instructions;