Search code examples
socrata

do some public Socrata data sets require login for programmatic access?


I'm trying to get started using public Socrata data.

I understand using the URL to request a data set, and see it is very easy in a browser.

But when I put the same url in a simple script that runs a web request, I get errors.

In one tool, I get

{   "error" : true,   "message" : "You must be logged in to access this resource" } 

In another type of simple coding, I get

An existing connection was forcibly closed by the remote host

  • Is that a correct behavior, that sites participating in SODA may only allow anonymous access in a browser?

( Or do I have a mistake in my script making the request? )


(EDIT --- I don't like hinting and biasing answers, but I am narrowing in on SSL stuff...)


Solution

  • Generally, no. Data published that you can access on a web browser (without logging in) is also available over API without login.

    However, if you create a private view (like filtering a public data set), then you will need to pass your login credentials over the API.

    So, one way to test it is if you can view the data through a web browser without logging in.