首页 文章

虽然令牌被传递,但在web api调用上获得not_authed松弛错误

提问于
浏览
7

我已成功在slack api中添加了一个应用程序,其权限范围设置为 administer the teams

我已经从 Legacy token generator 生成了令牌 . 我正在使用邮递员的以下信息进行api调用 .

endpoints :https://slack.com/api/users.list方法:GET Headers :key =标记值=标记生成

它回复了我以下的回应

{
  "ok": false,
  "error": "not_authed"
}

Trying the same things with curl is working but with POST method and does not works on GET method

curl -X POST https://slack.com/api/users.list --data "token=codehere"

我到底哪里错了 .

1 回答

  • 3

    它也适用于GET,但您必须将属性作为URL参数传递,而不是在 Headers 中 .

    以下是语法示例:

    https://slack.com/api/users.list?token=YOURTOKEN
    

相关问题