========here is WeChat development documentation of the relevant contents of======
Access to the chat interface of the service
When needed, developers can access to the chat interface of the service, to get more customer service session record, including customer service and user session all messages and create session, closing operations such as records, using this interface can be developed, such as "record", "work monitoring," "the performance evaluation of the service functions, such as"
Interface call request description
The HTTP request method: POST
https://api.weixin.qq.com/customservice/msgrecord/getrecord? Access_token=access_token
POST data description
POST data sample is as follows:
{
"Endtime" : 987654321,
"Pageindex" : 1,
"Pagesize" : 10,
"Starttime" : 123456789
}
Whether the parameter must
Access_token is call interface certificate
Starttime is queries start time, UNIX timestamp
Endtime that end of the query time, UNIX timestamp, and each query can't query across day
Pagesize is each page size, page the DORA take 50
Pageindex is query what page, starting from 1
Return instructions
Under normal circumstances, WeChat will return the following JSON data packets:
{
"Errcode" : 0,
"Errmsg" : ", "
"Retcode" : 0,
"Recordlist" : [
{
"The openid" : "oDF3iY9WMaswOPWjCIp_f3Bnpljk,"
"Opercode" : 2002,
Test1 "text", "hello, customer service, service for you,",
"Time" : 1400563710,
"The worker" : "test1"
},
{
"The openid" : "oDF3iY9WMaswOPWjCIp_f3Bnpljk,"
"Opercode" : 2003,
"Text", "hello, what is up?" ,
"Time" : 1400563731,
"The worker" : "test1"
}
]
}
Parameter description
The worker customer service account
Openid user's identity, the number of the current public only
Opercode operation ID (session state), details see below
Time operating time, UNIX timestamp
The text chat
Operation ID (session state) definition:
ID value that
1000 to create access session
1001 access session
1002 initiate conversation
1003 transfer session
1004 closing session
1005 rob connect session
2001 public messages are received
2002 customer service sends the message
Messages are received 2003 customer service
Error WeChat will return an error code and other information, please check the error message: according to the error code global return code description
========above is WeChat development documentation of the relevant contents of======
CodePudding user response:
WeChat customer service for more chat logs, return the result is {" recordlist ": []}, this how to do