| 0 |
<style type="text/css"> |
0 |
<style type="text/css"> |
| ... |
|
... |
|
| 9 |
<li><a href="#history">History</a></li> |
9 |
<li><a href="#history">History</a></li> |
|
|
10 |
<li><a href="#recent_changes">Recent Changes</a></li> |
|
|
11 |
<li><a href="#login">Login</a></li> |
| 10 |
<li><a href="#save">Save</a></li> |
10 |
<li><a href="#save">Save</a></li> |
| ... |
|
... |
|
| 240 |
|
240 |
|
|
|
243 |
<a name="recent_changes"> </a> |
| 241 |
## Recent Changes |
241 |
## Recent Changes |
| ... |
|
... |
|
| 272 |
|
272 |
|
| 273 |
To login to Open Library programatically, a POST request must be send to `/account/login` with `username` and `password` must be passed as a JSON dictionary. |
276 |
To login to Open Library programatically, a POST request must be send to `/account/login.json` with your S3 `access` and `secret` keys passed as a JSON dictionary. |
| 274 |
|
277 |
|
| 275 |
$ curl -i -H 'Content-Type: application/json' -d '{"username": "joe", "password": "secret"}' https://openlibrary.org/account/login |
278 |
$ curl -i -H 'Content-Type: application/json' -d '{"access": "your access key", "secret": "your secret key"}' https://openlibrary.org/account/login |
| 276 |
HTTP/1.1 200 OK |
279 |
HTTP/1.1 200 OK |
| 277 |
Set-Cookie: session="/user/joe%2C2009-02-19T07%3A52%3A13%2C74fc6%24811f4c2e5cf52ed0ef83b680ebed861f"; Path=/ |
280 |
Set-Cookie: session="/user/username%2C2009-02-19T07%3A52%3A13%2C74fc6%24811f4c2e5cf52ed0ef83b680ebed861f"; Path=/ |
| 278 |
|
281 |
|
| 279 |
Upon successful login, a set-cookie header is returned in the response. |
282 |
Upon successful login, a set-cookie header is returned in the response. Include this cookie with subsequent requests. |
|
|
283 |
|
|
|
284 |
Every Open Library account holder has S3 keys. You can find yours <a href="https://archive.org/account/s3.php">here</a>. |
| 280 |
|
280 |
|
| ... |
|
... |
|
| 315 |
Debug information about the error may be provided in the response to help trouble-shooting the issue. |
315 |
Debug information about the error may be provided in the response to help trouble-shooting the issue. |
|