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?