无法使用imgur API

时间:2018-06-14 01:00:58

标签: api http https http-status-code-400 imgur

我正在尝试使用imgur API将图片上传到imgur(最终我要上传到特定的相册,但我想先让个人上传工作)。我的应用程序已注册,我已经验证我可以进行其他需要OAuth的API调用。当我尝试使用“发布图像”端点时,如下所示:https://api.imgur.com/3/upload,在互联网上找到图像,www.w3schools.com / w3css / img_lights.jpg,它给出了一个错误

{
    "data": {
        "error": "Invalid URL (w3schools.com/w3css/img_lights.jpg)",
        "request": "/3/upload",
        "method": "POST"
    },
    "success": false,
    "status": 400
}

我正在使用邮递员进行API调用。为什么图像的网址无效,我应该如何格式化网址以进行API调用?

注意:我使用的网址如下所示:https://api.imgur.com/3/upload?image=www.w3schools.com/w3css/img_lights.jpg

提前感谢您的帮助!

0 个答案:

没有答案