5 Replies Latest reply on Jul 16, 2015 10:08 AM by shauncollett

    Connecting to Jive REST API through R

    shauncollett

      Hi there,

       

      I'm trying to connect to the Jive REST API v3 using the RCURL package and basic authentication in R, however I'm receiving a HTML response that there's a system error.  Code and response are posted below.  Any suggestions you have would be much appreciated.  I've tried using the same API call with basic authentication headers through Chrome's Postman app and it works well.

       

      R Code (sensitive information has been blinded):

      username <- "test@mydomain.com" password <- "password" u.p <- paste("Basic ", base64(paste(username, password, sep=":"))) api.url <- "https://mydomain.jiveon.com/api/core/v3/people/email/myuser@mydomain.com//mydomain.jiveon.com/api/core/v3/people/email/myuser@mydomain.com" response <- getURL(api.url, httpheader = c(Authorization=u.p))

       

      HTML Response:

      <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n\n<html>\n<head>\n    <title>System Error</title>\n    <style>\n    body {\n\t    font-family : arial, helvetica, sans-serif;\n\t    font-size: 81.25%;\n\t}\n    td, th, p, div, span, li, a { font-size : 1em; }\n    h1 { font-size : 1.72em; }\n    code {\n        font-family : courier new, monospace;\n        font-size : .8em;\n\t}}\n    </style>\n</head>\n<body>\n\n\n\n<div id=\"jive-header\" class=\"jive-clearfix\">\n    <h1>System Error</h1>\n</div>\n\n<p>\nWe're sorry but a serious error has occurred in the system.\n\n\n</body>\n</html>\n

       

      The user we're using for authentication is a standard, non-federated Jive user.

       

      Thanks!