Youtube resumes downloading 400 bad requests

I am trying to resume downloading on youtube using rest api clients. STEP 1:

https://www.googleapis.com/upload/youtube/v3/videos?uploadType=resumable&part=snippet,status,contentDetails

Headings

Authorization Bearer ya29.1.AADtN_UxUBz459k8HO_gropj2SW6ShlFsqBqJMXI3HVfcE4lKWkR-gq4_Tj0j6Oqb-oo_qnE Content-Length 278 Content-Type application/json; charset=UTF-8 X-Upload-Content-Length 1393167 x-upload-content-type application/octet-stream 

Body

 { "snippet": { "title": "My video title", "description": "This is a description of my video", "tags": ["cool", "video", "more keywords"], "categoryId": 22 } } 

I get a response of 200 Ok. I will retrieve the url that is used in a further request.

STEP-2:

https://www.googleapis.com/upload/youtube/v3/videos?uploadType=resumable&part=snippet,status,contentDetails&upload_id=AEnB2UqmDFhqQrOpbIgMp_E_bBUJeKfRyJfjfjfjfjfjfjfjfjfjfjfkfkf

Headings

 Authorization Bearer ya29.1.AADtN_UxUBz459k8HO_gropj2SW6ShlFsqBqJMXI3HVfcE4lKWkR-gq4_Tj0j6Oqb-oo_qnE Content-Length 1393167 Content-Type application/octet-stream 

Body

VideoFile - abcd.mp4

When I try to upload a file, it returns 400 with the following answer.

 { error: { errors: [1] 0: { domain: "global" reason: "badRequest" message: "Invalid Upload Request" }- - code: 400 message: "Invalid Upload Request" }- } 

I tried to execute the above request from the client - Advanced REST API and Postman REST client from Google chrome, Java program - wherever it returns 400. Can someone please indicate what error I am making in step 2. It would be very useful.

+7
rest youtube youtube-api file-upload
source share

No one has answered this question yet.

See related questions:

2263
How to get a thumbnail of a YouTube video using the YouTube API?
1449
Preview image before uploading it.
492
REST API error returns good practices
one
How to add video duration on youtube v3 api native android
one
Trying to get the title and description of a YouTube video.
0
How to get video using YouTube v3 API
0
When I resume downloading YouTube, it continues to respond to 308, so how can I complete the download?
0
YouTube Data API - Resume Downloads - Start a Resume Session - Errors
-one
Upload to YouTube v3 - 400 Bad Request

All Articles