尝试使用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
答案 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