-
So I was checking the api docs and found about getUploadLimits, but when I try in code it raises a error 😢, is this an issue with the SDK or the API itself? def main() -> None:
client = Client()
bot_profile = client.login(getenv('BOT_NAME'), getenv('BOT_PASSWORD'))
print(f"Logged as: {bot_profile.display_name}")
video_limit = client.app.bsky.video.get_upload_limits()
print(video_limit.model_dump_json())
|
Beta Was this translation helpful? Give feedback.
Answered by
MarshalX
Sep 13, 2024
Replies: 1 comment 1 reply
-
This is a server-side error. Because we need to perform this request to the video service instead of PDS as the default client behavior Here is the code example which will show how to properly use another service with a service token: def main() -> None:
client = Client()
client.login(os.environ['USERNAME'], os.environ['PASSWORD'])
service_token = client.com.atproto.server.get_service_auth(
models.ComAtprotoServerGetServiceAuth.Params(
aud='did:web:video.bsky.app',
lxm='app.bsky.video.getUploadLimits',
)
).token
video_client = Client('https://video.bsky.app')
video_client._set_auth_headers(service_token)
upload_limits = video_client.app.bsky.video.get_upload_limits()
print(upload_limits)
main() Please use SDK v0.0.54 or higher P.S. yes, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
MarshalX
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a server-side error. Because we need to perform this request to the video service instead of PDS as the default client behavior
Here is the code example which will show how to properly use another service with a service token: