It looks like you're offline.
Open Library logo

Open Library RESTful API → Diff

Added
Modified
Removed
Not changed
Revision 16 by Giovanni Damiola April 6, 2015
Revision 21 by jachamp September 1, 2023
body
0 <style type="text/css"> 0 <style type="text/css">
... ...
5 5
6 * [[#content|Content]] 6 <ul>
7 * [[#query|Query]] 7  <li><a href="#content">Content</a></li>
8 * [[#history|History]] 8  <li><a href="#query">Query</a></li>
9 * [[#save|Save]] 9  <li><a href="#history">History</a></li>
10 * [[#status_codes|Status Codes]] 10  <li><a href="#recent_changes">Recent Changes</a></li>
11  <li><a href="#login">Login</a></li>
12  <li><a href="#save">Save</a></li>
13  <li><a href="#status_codes">Status Codes</a></li>
14 </ul>
11 11
... ...
238 238
243 <a name="recent_changes">&nbsp;</a>
239 ## Recent Changes 239 ## Recent Changes
... ...
270 270
271 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.
272 277
273    $ 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
274    HTTP/1.1 200 OK 279    HTTP/1.1 200 OK
275    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=/
276     281    
277 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>.
278 278
... ...
313 Debug information about the error may be provided in the response to help trouble-shooting the issue. 313 Debug information about the error may be provided in the response to help trouble-shooting the issue.