前言
为了方便开发岗位的用户,助手支持了接口API,通过username(一般为手机号或者以5开头的设备号)和auth_key(接口api鉴权key)鉴权来调用部分开放接口。1
注意:接口API目前为实验功能,单个IP限制为300次/天,恶意使用将被封禁IP。
使用方法
获取云端信息列表
offset和limit为可选参数,用于分页。1
GET:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/msg?offset=1&limit=10
获取在线设备列表(cid)
1 | GET:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/cid |
发送设备通知
cid为设备号,通过在线设备列表接口获取;titile和content为推送的标题和内容。1
GET:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/notify?cid={{cid}}&title={{title}}&content={{content}}
发送短信
cid为设备号,通过在线设备列表接口获取;phone和content为对方手机号码和短信内容;slot(可选参数)为发短信的卡槽,值为0或1,代表卡槽一和卡槽二。1
GET:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/send-sms?cid={{cid}}&phone={{phone}}&content={{content}}&slot={{slot}}
短信列表
cid为设备号,通过在线设备列表接口获取;size(可选参数,默认为3)获取短信的条数。1
GET:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/recent-sms?cid={{cid}}&size={{size}}
未接来电列表
cid为设备号,通过在线设备列表接口获取;size(可选参数,默认为3)获取未接来电的条数。1
GET:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/missed-call?cid={{cid}}&size={{size}}
查询号码联系人名称
cid为设备号,通过在线设备列表接口获取;phone要查询的电话号码。1
GET:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/contact-name?cid={{cid}}&phone={{phone}}
获取联系人列表
cid为设备号,通过在线设备列表接口获取。1
GET:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/get-contact?cid={{cid}}
修改配置信息
cid为设备号,通过在线设备列表接口获取。支持修改的参数
【bool类型参数】
allow_sms:是否转发短信
allow_income_phone_send:是否转发未接来电
allow_notification_send:是否转发应用通知
allow_locate_send:是否转发定位信息
allow_battery_low_send:是否转发低电量消息
allow_battery_charge_send:是否转发充电提醒
allow_sms_send:开启或关闭短信转发
allow_email_send:开启或关闭邮箱转发
allow_web_send:开启或关闭邮箱转发
allow_wx_send:开启或关闭邮箱转发
allow_push_sms:开启或关闭通知转发
allow_script:开启或关闭脚本转发
allow_cheap_mode:开启或关闭省钱模式
allow_send_filter:开启或关闭过滤规则
1 | POST:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/alter-config?cid={{cid}} |
重置auth_key
1 | GET:https://api.smshelper.cozylife.tech/send/{{username}}/{{auth_key}}/reset |