Avoid Timeouts with Asynchronous Uploads
Are your requests taking too long and resulting in timeouts? For video, photo, or text post uploads that may require more processing time (file processing, social network publishing queues, etc.), use the async_upload parameter to make your request asynchronously.
How does it work?
- Send your request with
async_upload=trueto the appropriate upload endpoint. - The API will immediately respond with a
request_id. - Use this
request_idto check the progress and result at the status endpoint.
Checking Status
The status endpoint supports two different identifier types:
request_id: Returned by upload endpoints whenasync_upload=truejob_id: Returned when you schedule posts withscheduled_date
For Async Uploads
GET /api/uploadposts/status?request_id=<REQUEST_ID>
For Scheduled Posts
After scheduling a post with scheduled_date, the API returns a job_id. Use it to check the status after the scheduled time:
GET /api/uploadposts/status?job_id=<JOB_ID>
Relevant Endpoints
- Text upload:
POST /api/upload_text - Video upload:
POST /api/upload - Photo upload:
POST /api/upload_photos - Upload status:
GET /api/uploadposts/status?request_id=<REQUEST_ID>or?job_id=<JOB_ID>