1

I am trying to use my own generated app token to access the socrata data, but I don't know why my app token is useless, and it always returns "forbidden 403" and "error in getResponse()"

I checked the syntax for read.socrata() function, and modify the the parameters but it still not works

api_url2004 <- "https://openpaymentsdata.cms.gov/resource/gysc-m9qm.csv?$$app_token = <token>"
query <- soql() %>%
  soql_add_endpoint(api_url2004) %>%
  soql_limit(2000)
token <- "<token>"
data <- read.socrata(query, app_token = token)

I would expect that I could successfully logged in and access to the dataset, it now only displays 403 error

Zoe
  • 27,060
  • 21
  • 118
  • 148
Cooper
  • 73
  • 6
  • 1
    Though I commiserate with your problem, if this is your real token then you need to change it ***immediately***. Don't bother editing or deleting the question, it is still plainly visible (albeit to fewer people). (And because of how the internet work, even getting a moderator to hard-delete it does not ensure anything. If it is real, then it is compromised and needs to be revoked.) – r2evans May 28 '19 at 04:30

1 Answers1

0

It appears this data set is private. I attempted to access the normal data set, https://openpaymentsdata.cms.gov/d/gysc-m9qm and received a login screen. This indicates the data set is private, so you won't be able to access the API without logging-in an having privileges to the private data set.

As a note, the app token doesn't grant you access to private data sets. In RSocrata, this would require using the email and password options in read.socrata().

Tom Schenk Jr
  • 478
  • 2
  • 8