Goodreads Developers discussion
questions
>
oauth rate limit
date
newest »

message 1:
by
John
(new)
Mar 19, 2014 08:32PM

reply
|
flag

if you're not preserving state and have 1000s of users reauthenticating every minute, then thats a problem, and we would take steps, to lessen impact on our other customers.
What does your app do?

I wouldn't think it would have a lot of traffic (especially in the beginning) but the only way to be sure that I'm not exceeding one request per second is to write code to wait between requests. I just wanted to check if I needed to add the complication to rate limiting to the oauth flow or not.
If I don't need to insert sleeps into oauth then this would be the flow for a new user:
* I get a response token using my API key and create an authorize URL.
* The user goes to the authorize URL, logs in and gets redirected to my callback URL.
* I get the verifier from the callback URL and use it to get an access token.
* I call auth_user to get the user ID (and wait a second).
* I call review/list to get a list of the user's read books (and wait a second).
* If the attributes on the reviews tag indicates that there are more results then I call review/list again (and wait a second). Repeat as necessary.
* I generate some recommendations based on the user's read books and show them to the user.
