帮助列表
帮助列表
openapi v4调用规则

1.请求地址:

https://openapi.aodianyun.com/v4/service


2.请求头:

① X-AccessId: 系统分配的访问者身份标识

② X-TimeStamp:时间戳,是1970年一月一日0点到当前的秒数。用于本服务端当前时间比较,超过某一个值后就要返回过期失败。

③ X-SignatureNonce:随机数,请求时候尽量不要重复,至少10分钟内不要重复。

④ X-Signature:签名,用于验证请求合法性。签名生成规则将在后文介绍。

⑤ X-Api:调用方法

⑥ X-Service:调用服务


3.签名机制:

进行签名前请确保已获取账号 access_id access_key,分别对应X-AccessId、X-AccessKey


3-1.组织明文签名字符串

组织明文签名串stringToSign,按如下格式拼接待签名字符串:

stringToSign=

X-AccessId+"\n"+

X-AccessKey+"\n"+

X-SignatureNonce+"\n"+

X-TimeStamp+"\n"+

body


3-2.计算签名

X-Signature=md5(stringToSign),其中md5取32位小写。

示例:

X-AccessId="id11111" ,

X-AccessKey="key22222",

X-SignatureNonce="a234567",

X-TimeStamp=1539084154,

X-Api="lps/create",

X-SaasId="aa",

body="{"user":1233,"age":88,"name":"Tom"}"

则:

stringToSign='id11111\nkey22222\na234567\n1539084154\nlps/create\naa\n{"user":1233,"age":88,"name":"Tom"}'

signature=md5(stringToSign)=a589810bd181755176f93fc202511218


4.curl完整请求示例:

方式:

POST

请求地址:

https://openapi.aodianyun.com/v4/service

请求头:

Content-Type: application/json

X-AccessId:"id11111"

X-Signature:"a589810bd181755176f93fc202511218"

X-TimeStamp: 1539084154

X-SignatureNonce: a234567

X-Api: "createProject"

X-Service: "rtt"

请求体:

'{"uin":1233,"age":88,"name":"Tom"}'


curl请求命令:

curl -X POST -i http://openapi.aodianyun.com/v4/service -d '{"uin":1233,"age":88,"name":"Tom"}' -H "X-AccessId:id11111" -H "X-Signature:a589810bd181755176f93fc202511218" -H "X-TimeStamp: 1539084154" -H "X-SignatureNonce: a234567" -H "Content-Type: application/json" -H "X-Api: createProject" -H "X-Service: rtt"


2006 - 2023 aodianyun.com, All Rights Reserved. 奥点科技 版权所有 增值电信业务经营许可证:浙B2-20110306 浙ICP备07500424号 |

  • 电话

    X

    售前咨询:

    400-663-6063

    售后服务:

    400-663-6063

  • 客服

  • 建议

    咨询留言 X
    提  交

在线QQ

售前咨询400-663-6063

售后服务400-663-6063