Getting rate limit #2818
-
Getting rate limit error when testing API. So the limit is 100 per day? Is there way to bypass?
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 10 replies
-
if your atproto_client calls PDS API, you can bypass ratelimit by self hosting your own PDS atproto/packages/pds/src/config/env.ts Lines 97 to 99 in 319aa7c but if you are testing other component API, it may be hard to bypass ratelimit. |
Beta Was this translation helpful? Give feedback.
-
I'm getting this too - why is the limit 100/day when in the docs I see a limit of 3000 every 5 minutes? All I'm using is |
Beta Was this translation helpful? Give feedback.
-
After some more searching it looks like this is because they want us to use JWT tokens instead of logging the agent in every time. I've figured out how to save and refresh my token - is there a simple way of getting the Atproto/BskyAgent to use the token instead of the |
Beta Was this translation helpful? Give feedback.
-
Just wanted to throw this in here for when people stumble across the same issue |
Beta Was this translation helpful? Give feedback.
-
Rate limit on what? On com.atproto.server.createSession or on anything? A rate limit of 100 logins per day makes sense cause you shouldn't have to log in so much. |
Beta Was this translation helpful? Give feedback.
-
Anyone have a reference to how to get/refresh the JWT in a javascript/typescript environment? Running into the same issue. |
Beta Was this translation helpful? Give feedback.
-
I'm also getting this error - the limit is now 10 per day. Response(
success=False,
status_code=429,
content=XrpcError(error='RateLimitExceeded', message='Rate Limit Exceeded'),
headers={'date': 'Wed, 22 Jan 2025 16:19:25 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '61',
'connection': 'keep-alive',
'x-powered-by': 'Express',
'access-control-allow-origin': '*',
'ratelimit-limit': '10',
'ratelimit-remaining': '0',
'ratelimit-reset': '1737633541',
'ratelimit-policy': '10;w=86400',
'etag': '...',
'vary': 'Accept-Encoding'}
) |
Beta Was this translation helpful? Give feedback.
-
As per a previous comment, you can fill the session details manually, by logging into your account from the browser, and getting the credentials there. With the following code, the session is created using the session string. client = Client()
with open('session.txt') as f:
session_string = f.read()
if session_string:
profile = client.login(session_string=session_string)
else:
profile = client.login(username, password)
session_string = client.export_session_string()
with open('session.txt', 'w') as f:
f.write(session_string)
print(f"Logged into {profile.display_name} (@{profile.handle})") Fill [handle]:::[did]:::[access_token]:::[refresh_token] To find the data, open your browser, go to Bluesky, and open the developer console. Go under the "network" tab, and search for the
Using this method, I could authenticate my Python client even though logging in with user/password is rate limited for the day. Sources : Session string format - Separator |
Beta Was this translation helpful? Give feedback.
After some more searching it looks like this is because they want us to use JWT tokens instead of logging the agent in every time. I've figured out how to save and refresh my token - is there a simple way of getting the Atproto/BskyAgent to use the token instead of the
agent.login(...)
from the tutorials? I'd like to use theagent.uploadBlob
andagent.post
calls I've already written instead of re-writing those asfetch
s. I've tried a few things but it seems to be ignoring any headers I try and set in the constructor or those I set by configuring a static fetch handler.