R API to retrieve data from Bluefolder

Hi to all my r programmers,

I don't know if this is possible but I was trying to use API to connect to a website. There's documentation on the site but the examples are in curl, c#, and php. I'm not sure what steps to do. I assume I can use the "httr" package but I'm not even sure. I was given a token but will use an example in my code.


How to Access Any RESTful API Using the R Language:

Example Code to retrieve list of all customers:


username <- "Example12345"
password <- "X"

r <- GET("https://app.bluefolder.com/api/2.0/customers/list.aspx", authenticate(username, password, type = "basic"))

txt_poke <- content(r, "text", encoding = "ISO-8859-1")
json_poke <- fromJSON(txt_poke, flatten=TRUE)

I don't think I'm even connecting right. I keep getting the message:

<response status="fail">
  <error code="error_code">


Error: lexical error: invalid char in json text.
                                       <response status='fail'>       
                     (right here) ------^

Httr Package:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.