【发布时间】:2020-10-29 09:22:29
【问题描述】:
我正在尝试使用 R 和 httr 包访问 LinkedIn 的 API。
当我执行最后一个 oauth2.0_token() 函数时,为了获得授权令牌,我从 LinkedIn 收到以下错误:"The redirect_uri does not match the registered value"。
我已将 LinkedIn 开发者网站上的重定向网址设置为 http://my_app_54321
有谁知道解决方法是什么?
# Packages
library(httr)
# Client info
clientid <- "my_id"
secret <- "my_secret"
# App
app <- oauth_app(appname = "app name", key = clientid, secret = secret)
# Endpoints
endpoint <- oauth_endpoint(base_url = "https://www.linkedin.com/uas/oauth2",
authorize = "authorization", access = "accessToken")
# Access token
token <- oauth2.0_token(endpoint = endpoint, app = app)
token
【问题讨论】:
-
我认为这可以帮助你:stackoverflow.com/questions/26570194/…
-
非常感谢@Fryla-CristianMarucci!
标签: r api oauth-2.0 linkedin httr