取得對話 API
1 |
curl -v -u {email_address}:{password} https://www.zopim.com/api/v2/chats |
--
PHP 程式範例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<?php // $username = ZOPIM_Username; $password = ZOPIM_Password; //$URL = 'https://www.zopim.com/api/v2/chats'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password ); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); $result = curl_exec ($ch); curl_close ($ch); $Json = json_decode($result, true); |
--
791 total views, 1 views today