# Customer Service Enter Status
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: typing
This interface is used to set customer service input status.
Weixin Mini Program When used, see customer service message input status .
# 1. How to call
# HTTPS calls
POST https://api.weixin.qq.com/cgi-bin/message/custom/typing?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 the interface belongs are: 1, 6, 19, 100-101
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
Parameter Name | type | Required to fill in | Introductions |
---|---|---|---|
touser | string | yes | User's OpenID |
command | string | yes | Order. Typing means issuing a "typing" state to the user; CancelTyping means to cancel the "Typing in" status for the user |
# 3. Return Parameters
# Response Payload
Parameter Name | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message |
# 4. Note
# Be careful
- Official Account and Service Account, the request address is:
POST https://api.weixin.qq.com/cgi-bin/message/custom/typing?access_token=ACCESS_TOKEN
- Weixin Mini Program and MiniGame, the request address is:
POST https://api.weixin.qq.com/cgi-bin/message/custom/business/typing?access_token=ACCESS_TOKEN
# 5. Code examples
Example Requests
{
"touser":"OPENID",
"command":"Typing"
}
Return an example
{
"errcode": 0,
"errmsg": "ok"
}
# 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 |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
40001 | invalid credential access_token isinvalid or not latest | AppSecret error while getting access_token, or access_token is invalid.Developers should check that AppSecret is correct, or that they are calling interfaces for the appropriate Official Account |
40200 | invalid account type | Account type does not meet the requirements |
45072 | invalid command | Incorrect command field value |
45080 | need sending message to user orrecving message from user in the last 30 seconds before typing | Sending input status requires that you have had a message interaction with the user in the previous 30 seconds |
45081 | you are already typing | It is already in input state and cannot be repeated |
# 7. Scope of application
Weixin Mini Program | Official Account | Service Account | MiniGame |
---|---|---|---|
✔ | Certification only | Certification only | ✔ |
- ✔: The account can call this interface
- Authentication only: means that only authenticated accounts are allowed to be invoked by the enterprise entity, and accounts that are not authenticated or do not support authentication cannot be invoked.
- Other account types that are not expressly stated may not be called on this interface without special instructions;