QQ扫一扫联系
所有接口调用根路径为 http://api.tecmz.com/open_api/ ,调用方式为 POST
。
参数 | 错误说明 |
---|---|
app_id | AppId |
timestamp | 时间戳,从1970年01月01日到现在的秒数,误差不超过1800秒 |
sign | 请求签名,计算方式见 签名生成方法 |
param="app_id=xxxxxxxxxx&body=test×tamp=1365773829";
paramWithSecret=stringA+"&app_secret=xxxxxxxxxxxxxx" sign=md5(paramWithSecret)
param=param+"&sign="+sign
<?phpfunction common($params, $appSecret, $function = 'urlencode'){ ksort($params, SORT_STRING); $str = []; foreach ($params as $k => $v) { $str [] = $k . '=' . $function($v); } $str[] = 'app_secret=' . $appSecret; $str = join('&', $str); $sign = md5($str); return $sign;}
{ "code": 0, "msg": "ok", "data": { "xxx": "xxx" }}
其中 data 中为业务数据
{ "code": "<错误码>", "msg": "<错误原因>"}
错误码 | 错误说明 |
---|---|
0 | 业务处理成功 |
-1 | 业务处理出现错误 |