I'm trying to authenticate to the XING API (api.xing.com) using ROAuth (v0.9.2).
library(package="RCurl")
library(package="ROAuth")
site <- "https://api.xing.com"
requestTokenPath <- "/v1/request_token"
accessTokenPath <- "/v1/access_token"
authorizePath <- "/v1/authorize"
consumerKey <- "***********" # blank key for posting
consumerSecret <- "********" # blank key for posting
requestURL <- paste(site, requestTokenPath, sep="")
accessURL <- paste(site, accessTokenPath, sep="")
authURL <- paste(site, authorizePath, sep="")
credentials <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=requestURL,
accessURL=accessURL,
authURL=authURL,
needsVerifier=TRUE)
credentials$handshake(ssl.verifypeer=FALSE) # skip ssl verification for testing, this is passed through to RCurl
Output:
Error in credentials$handshake(ssl.verifypeer = FALSE) :
Invalid response from site, please check your consumerKey and consumerSecret and try again.
I double checked my keys and the URLs, so I'm pretty sure that's not the cause of the error.
- Can anybody tell me what I'm doing wrong?
- Is there a way to extract the server requests and responses for error analysis?
Thanks, Chris