松弛的CURL hinters.app得到internal_error

时间:2020-02-10 21:52:04

标签: slack-api

尝试使用reminders.app通过curl发布提醒。

出现以下错误

{“ ok”:false,“ error”:“ internal_error”,“ warning”:“ missing_charset”,“ response_metadata”:{“ warnings :: [” missing_charset“]}}}

curl -X POST -H 'Authorization: Bearer secretsxxxxxxxxxxxxx' -H 'Content-type: application/json' --data \
'{
    "ok": true,
    "reminder": {
        "text": "eat a banana",
        "recurring": false,
        "time": 1602288000
    }
}' https://slack.com/api/reminders.add

1 个答案:

答案 0 :(得分:1)

您需要将以下行https://slack.com/api/reminders.add更改为https://slack.com/api/reminders.add?。在末尾加上问号。

因此您的代码应为:

curl -X POST -H 'Authorization: Bearer secretsxxxxxxxxxxxxx' \
-H "Content-type: application/json" \
--data '{"text": "I hope you eat your banana","time":1581447960}' \
https://slack.com/api/reminders.add