AuthenticationService offers an alternative cookie based authentication
method. Using the AuthenticationService, you can request a cookie that can be included
with subsequent requests.
Requests can also be authenticated by passing in HTTP
Authentication headers, and in a subsequent release of the API we will
also support authentication by OAuth.
> curl --user login:pass https://opendata.socrata.com/api/users/login/views.json
Compliance Level: This method is a Socrata extension to the SODA standardUse a
POSTrequest to retrieve an authentication cookie. The service will also respond with a User object for the authenticated user.
usernamestring (required)The user login you wish to authenticate as
passwordstring (required)The user's password to authenticate with
Authenticating in order to retreive an authentication cookie:
> curl --cookie-jar cookies.txt --data username=login --data password=pass https://opendata.socrata.com/api/authenticate
After you've requested an authentication cookie, you can reuse it to make further requests to private resources, such as rows in a private dataset:
> curl --cookie cookies.txt https://opendata.socrata.com/api/views/4haf-yu5g/rows.json