read.csv for web based csv file works locally, but not when hosted on

This code works fine when run locally (Windows 10), but gives me the following error when I try to run it through shinyapps[dot]io:

Warning in open.connection(file, "rt") : cannot open URL '': HTTP status was '403 Forbidden'

The little bit that I could find online suggested that there may be some issues with shinyapps[dot]io's Linux environment handling URLs, but I can't figure out how to correct for this.

Does anyone have a workaround?

ui <- fluidPage(
column(12, dataTableOutput("ncaaf_table"))

server <- function(input, output) {
  output$ncaaf_table <- renderDataTable({
} uses Linux so you may want to switch from using url to something like httr::GET.

Can you try this instead? httr::GET("")

1 Like

The HTTP 403 error means that the server (at refused the connection from

Does access to the csv you want on have any authentication requirements (that you maybe have configured locally but which wouldn't existing on shinyapps)?

As far as I know there isn't any authentication required for that website, but that would make sense. Maybe it has some kind of protections built in to prevent abuse from scraping bots or something.

This also works great locally, but then fails when pushed to the environment.

I had the same issue, here is how I fixed it:

n <- getURL("", ssl.verifypeer = FALSE)
newData <- read.csv(textConnection(n), stringsAsFactors = F,sep = "\t",header = F) 

While setting the SSL to not verify is obviously not an optimal solution, it enabled me to get the application back online.

1 Like