I am able to get a API authentication token using the curl command on cygwin terminal on windows
curl -X POST -d '{"username":"usenamexxx","password":"passwordxxx"}' https://demo.website.com/api/token
output looks like
{"token":"87JrlYIOQa6g6aXciJOxNUK81","_links":{"DiscoveryPage":{"title":"Available API Resources","href":"https://demo.website.com/api"}}}
but when I try the POST command from R using the httr package I get the following error
library(httr)
tokenURL <- "https://demo.website.com/api/token"
s <- POST(tokenURL,body = list(username = "usenamexxx",password = "passwordxxx" ))
Error in function (type, msg, asError = TRUE) :
Unknown SSL protocol error in connection to demo.website.com:443
What am I doing wrong. Is there a different way to use POST?
Sorry I cannot provide a reproducible example as I cannot share my authentication details. If there is a way to provide more details please let me know.