[Python] How To Handle Rate Limiting In Python API

Discussão em 'Python' iniciado por Stack, Maio 2, 2025.

  1. Stack

    Stack Membro Participativo

    I am making a SOAP request to Salesforce Marketing Cloud API to retrieve Data Extension object records in batches of 2500 from an object who has 1,000,000 records total. Unfortunately the SDK is not an option due to an existing bug with respect to DE name lengths. Approximately halfway through, after running fine, I receive a 500 response and subsequent fail. From what I've read, it's due to throttling:

    https://developer.salesforce.com/do...g-cloud/guide/rate-limiting-errors-codes.html

    IN GENERAL, What is a good way to handle rate limiting within API requests? Do you add sleep timers to give more time in-between subsequent calls. Or would you catch the 500 response (or whatever error response you're receiving) and then add a sleep timer from there?

    It's my first time running into this, so I appreciate any guidance / resources and am happy to test from there.

    Continue reading...

Compartilhe esta Página