Why does this setting in the Genesys Cloud Python SDK not automatically handle 429 Too Many Requests errors when I attempt to bulk-create users via a loop?
I am building a utility script (node background, but using the Python SDK genesys-cloud-platform-client v2.0 for this specific task) to onboard agents from a CSV file. My current approach iterates through the rows and calls users_api.post_users() for each entry.
from genesyscloud.platform.client import GenesysCloudClient
def create_users_from_csv(csv_path):
client = GenesysCloudClient.from_file_config()
users_api = client.users_api
with open(csv_path, 'r') as f:
for line in f:
name, email = line.split(',')
body = {
"name": name,
"email": email,
"phoneNumbers": [{"value": "ext123", "type": "work"}]
}
try:
users_api.post_users(body=body)
except Exception as e:
print(f"Failed: {e}")
The script fails after ~50 users with HTTP 429. I know the REST API has rate limits, but I expected the SDK to include retry logic or exponential backoff. Is there a specific configuration flag I missed, or do I need to implement my own async queue with asyncio to throttle these requests? Running on macOS with Python 3.11.