sm.sm图床api获取空间容量的方法,使用ShareX快捷上传存储
API Token获取:https://sm.ms/home/apitokenLinux下测试获取容量等个人信息,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$"
}
我有一个图床。特别号用。还不用翻墙。,而且什么图都能发
页:
[1]