成长值: 252 签到天数: 4709 天 [LV.Master]伴坛终老
|
发表于 2020/3/27 22:51
|
显示全部楼层
|阅读模式
|Google Chrome 80.0.3987.149 |Windows 10
API Token获取:https://sm.ms/home/apitoken
Linux下测试获取容量等个人信息,Authorization字段换成你自己的Token
- curl -X POST "https://sm.ms/api/v2/profile" \
- -H "Content-Type: multipart/form-data" \
- -H "Authorization: 14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"
复制代码
响应如下,代表访问api成功
{
"success": true,
"code": "success",
"message": "Get user profile success.",
"data": {
"username": "1265578519",
"email": "1265578519@qq.com",
"role": "user",
"group_expire": "0000-00-00",
"email_verified": 1,
"disk_usage": "3.97 MB",
"disk_limit": "5.00 GB",
"disk_usage_raw": 4159643,
"disk_limit_raw": 5368709120
},
"RequestId": "C2D7F312-E0A4-4B60-BF67-52A9F632B591"
}
api能成功使用后,就可以来对接ShareX做成图床了
请求类型:POST
URL:https://sm.ms/api/v2/upload
文件表单名称:smfile
头部:Authorization,值写自己的Token
响应类型,文本,URL值为:$json:data.url$$json:images$
要导入的话可以直接复制这个剪贴板导入,记得改成自己的Token就能直接用了:
- {
- "Name": "sm.ms",
- "DestinationType": "ImageUploader, FileUploader",
- "RequestType": "POST",
- "RequestURL": "https://sm.ms/api/v2/upload",
- "FileFormName": "smfile",
- "Headers": {
- "Authorization": "14ac5499cfdd2bb2859e4476d2e5b1d2bad079bf"
- },
- "ResponseType": "Text",
- "URL": "$json:data.url$$json:images$",
- "DeletionURL": "$json:data.delete$"
- }
复制代码
|
评分
-
查看全部评分
|