Could someone explain the exact constraints for file uploads in the Web Messaging guest API? We are building a Django backend to process inbound messages from Genesys Cloud. Our Celery workers are receiving payloads via webhook, but we hit intermittent 413 errors when customers upload PDFs larger than 5MB. The documentation mentions a limit, but it is vague on whether this applies to the initial upload request or the subsequent media resource fetch.
We are using the guest API to simulate uploads for testing:
import requests
headers = {
'Authorization': f'Bearer {token}',
'Content-Type': 'multipart/form-data'
}
files = {'file': open('test.pdf', 'rb')}
response = requests.post(
'https://api.mypurecloud.com/api/v2/conversations/messaging/media',
headers=headers,
files=files
)
The 413 error suggests the payload is too large, but I suspect it might be a MIME type issue. Does the API reject non-standard binary types before size validation? We need to validate these on the Django side before sending to Celery to avoid worker crashes.
Thanks for the help.