PubNio calls X’s POST /2/media/upload/{id}/finalize (finalizeMediaUpload) to close a video upload once every segment is sent.
How PubNio calls it
- Publishing:
POST /api/v1/posts(unless it saves a draft),POST /api/v1/posts/{postId}/publish, orPOST /api/v1/posts/{postId}/targets/{targetId}/retrystarts the delivery. - PubNio finalizes in the same step that creates the post, right before it, and only when the upload session’s committed bytes equal the stored size; otherwise the delivery fails as
media_preparation_failed. - The response’s
processing_infodecides whether PubNio must wait for X to process the video before it creates the post.
Scopes
- The pinned spec lists one scope:
media.write. - PubNio’s X sign-in requests every one of them.
- Before a delivery makes this call, PubNio checks that the account granted
tweet.write.
Errors
PubNio has no X error code pages yet. Provider error codes covers the providers that have them.
Spec and changes
finalizeMediaUpload in the pinned spec, revision 2.175.
Checked weekly; no change to POST /2/media/upload/{id}/finalize recorded since this revision. Change tracker.
Limits
- Finalizing does not make the video postable on its own; until
processing_info.stateissucceededor absent, PubNio does not create the post. This step is never retried.