Novice attempting R, as displayed below, to obtain an oauth token using HTTR
package in R and have a status code of 401.
Any insight as to the cause of this error and a resolution?
Thanks in advance.
# Status: 401
library(httr)
base64_value <-
"123456789="
response16 <-
httr::POST (url = "https://api.precisely.com/oauth/token" ,
httr::add_headers(Authorization = paste("Basic", base64_value, sep
= "")),
body = list(grant_type = "client_credentials"),
encode = "form"
)
#verbose(data_out = true, data_in = False, info = false, ssl = false)
warn_for_status(response16)
stop_for_status(response16)
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
[[alternative HTML version deleted]]
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.