在Dropbox中使用javascript提取请求无法获取访问令牌

问题描述

我尝试通过以下方式使用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 (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...