I am trying to use RCurl for an oauth 2 authentication. My code is:
library(RCurl)
myOpts <- curlOptions(httpheader =
c(Accept="application/json",
"Content-Type"="application/x-www-form-urlencoded"))
token <- postForm(authURL,
.params = list(
client_id ="aaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
client_secret = "bbbbbbbbbbbbbbbbbbbbbbbbbbbb",
username = "[email protected]",
password = pswd),
.opts = myOpts,
style="POST")
The code works just fine on R/Windows, but not on OS X El Capitan. On OS X, I get the error
Error in function (type, msg, asError = TRUE) :
SSLRead() return error -9806
I think it is a problem with SSL in the version of curl/libcurl that ships with OS X, and is documented elsewhere, but I haven't been able to figure out a fix. For what it's worth, I had similar problems with the httr package. How do I update curl and make it play nicely with RCurl?
My question is quite similar to How do I get RCurl to connect to POST SSL on OS X Yosemite?, but El Capitan has made it difficult to copy the curl-config file as suggested in the answer to that post.