Skip to content

How to request video upload limits (get_upload_limits)? #400

Answered by MarshalX
GuiSaiUwU asked this question in Questions
Discussion options

You must be logged in to vote

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 = 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MarshalX
Comment options

Answer selected by MarshalX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #396 on September 13, 2024 17:35.