LinkedIn API error of redirect uri from httr

若如初见. 提交于 2020-07-23 06:53:06

问题


I'm trying to access LinkedIn's API using R and the httr package.

When I execute the last oauth2.0_token() function, in order to gain an authorization token, I get the following error from LinkedIn: "The redirect_uri does not match the registered value".

I've set my redirected url on the LinkedIn Developer site to http://my_app_54321

Does anyone know what the solution is?

# 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

来源:https://stackoverflow.com/questions/62803714/linkedin-api-error-of-redirect-uri-from-httr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!