0
我想让我的初始GET调用检索我的令牌请求的代码。我搜索了几个小时,我无法弄清楚为什么我得到一个CORS错误。我在管理面板中设置了重定向网址,并包含在我的查询参数中。我也试过没有它。没有任何工作。slack api请求代码
它应该是这样简单吗?
fetch(`https://slack.com/oauth/authorize?scope=identity.basic&client_id=xxxxxxxxx.xxxxxxx`)
.then(res => console.log(res))
ERROR
Fetch API cannot load https://slack.com/oauth/authorize?scope=identity.basic&client_id=148914445073.148918419105. Redirect from 'https://slack.com/oauth/authorize?scope=identity.basic&client_id=xxxxxxxx.xxxxxxxx' to 'https://slack.com/oauth/authorize?client_id=xxxxxx.xxxxx&scope=identity.basic&team=T4CSWD325' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.