这里,以python调用物联卡指定日期用量日志查询为例:
- import requests
- from requests.auth importHTTPBasicAuth
- url ='https://api.openluat.com/sim/iotcard/usagelog'
- payload ={
- 'msisdns':'123345,234567',
- 'query_date':'20180827',
- }
- appkey ='your app key'
- appsecret ='your app secret'
- #appkey,appsecret是在 http://sim.openluat.com/apiinterface 获取的
- #在 http://sim.openluat.com/apiinterface 查看自己的appkey,appsecret。
- auth =HTTPBasicAuth(appkey, appsecret)
- requests.post(url, json=payload, auth=auth)