问题描述
我尝试通过以下方式使用javascript提取访问令牌:
map_dfr(names(iris)[1:2],~ tidy(lm(reformulate('Species',response = .x),data = iris)))
# A tibble: 6 x 5
# term estimate std.error statistic p.value
# <chr> <dbl> <dbl> <dbl> <dbl>
#1 (Intercept) 5.01 0.0728 68.8 1.13e-113
#2 Speciesversicolor 0.93 0.103 9.03 8.77e- 16
#3 Speciesvirginica 1.58 0.103 15.4 2.21e- 32
#4 (Intercept) 3.43 0.0480 71.4 5.71e-116
#5 Speciesversicolor -0.658 0.0679 -9.69 1.83e- 17
#6 Speciesvirginica -0.454 0.0679 -6.68 4.54e- 10
成功从重定向后,我收到AUTHORIZATION_CODE “ https://www.dropBox.com/oauth2/authorize ...”域。
fetch('https://api.dropBoxapi.com/oauth2/token',{
method: 'POST',code: AUTHORIZATION_CODE,grant_type: 'authorization_code',redirect_uri: `${REDIRECT_URI}${window.location.pathname}`,headers: {
'Content-Type': "application/x-www-form-urlencoded"
},CLIENT_ID: CLIENT_SECRET
})
.then(res => res.json())
.then(data => console.log('access data =>',data))
.catch(err => console.log('access err =>',err));
我在做什么错?因为我从这里遵循curl请求示例: https://www.dropbox.com/developers/documentation/http/documentation#oauth2-token
{"error_description": "No auth function available for given request","error": "invalid_request"}
谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)