Problems to access an API in R

I am trying to download some data from an API. Following the site documentation:

library(jsonlite)
document <- fromJSON("https://api.gurufocus.com/public/user/{your personal token?}/stock/WMT/keyratios");
epv <- document$ValuationI am trying to download some data from an API. Following the site documentation:

EPV`
cat(epv)

I inserted my token, but unfortunately, I get this error: Error in open.connection(con, "rb") : HTTP error 404.

Any idea to solve this problem?

Best regards

If your token is ABC I would expect

library(jsonlite)
document <- fromJSON("https://api.gurufocus.com/public/user/ABC/stock/WMT/keyratios")
str(document)

to work.
Is this what you tried?

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.