问题
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