代码示例

最近更新时间:2020-01-09 11:45:29

import requests
from requests_aws4auth import AWS4Auth
import time
import json
#ak = ‘your ak’
#sk = 'your sk'
url = 'http://bri.api.ksyun.com'
region = 'cn-shanghai-3'
service = 'bri'
phoneno = ["15118376562","13520438342", "13900100033"]
data = str(json.dumps(phoneno))
params={"Action":"CheckPhone","Version":"2019-12-18","Data":data}
print('请求参数:')
print(params)
auth = AWS4Auth(ak, sk, 'cn-shanghai-3', 'bri')
response = requests.get(url,params=params, auth=auth)
print('响应内容:')
print(response.text)

金山云,开启您的云计算之旅

注册有礼