The multi-Customer Service chat record obtained is empty. the multi-customer service record has been revised with the multi-customer service function. now, the content obtained from the chat record of the multi-customer service is blank: {"recordlist": []}
Below is my code
$ Data = '{
"Starttime": 1460304001,
"Endtime": 1460372401,
"Pageindex": 1,
"Pagesize": 1
}';
// Request a chat record
$ Url = 'https: // api.weixin.qq.com/customservice/msgrecord/getrecord? Access_token = '. $ ACC_TOKEN;
$ Result = https_post ($ url, $ data );
Echo $ result ."
";
// Retrieve the chat record
$ Jsoninfo = json_decode ($ result );
$ Json_data = $ jsoninfo-> recordlist;
Function https_post ($ url, $ data)
{
$ Curl = curl_init ();
Curl_setopt ($ curl, CURLOPT_URL, $ url );
Curl_setopt ($ curl, CURLOPT_SSL_VERIFYPEER, FALSE );
Curl_setopt ($ curl, CURLOPT_SSL_VERIFYHOST, FALSE );
Curl_setopt ($ curl, CURLOPT_POST, 1 );
Curl_setopt ($ curl, CURLOPT_POSTFIELDS, $ data );
Echo "curl:". $ data ."
";
Curl_setopt ($ curl, CURLOPT_RETURNTRANSFER, 1 );
$ Result = curl_exec ($ curl );
If (curl_errno ($ curl )){
Return 'errno'. curl_error ($ curl );
}
Curl_close ($ curl );
Return $ result;
}
Reply to discussion (solution)
I think two of them may have changed the data structure submitted at the moment. your access_token is no longer expired.
I think two of them may have changed the data structure submitted at the moment. your access_token is no longer expired.
In fact, there is no problem with the code. after a Google browser is changed, the Sogou browser is too scum. it took me half a day ....
Thank you.