How to get videoId when video is uploaded on Vimeo

454 Views Asked by At

How do I get the videoId after a video is uploaded on vimeo? When we call delete upload ticket, we have confirmed that the upload is successful and we are getting a response url like this url=https://api.vimeo.com/users/111243975/uploads/319650191?video_file_id=1786656414&upgrade=true&signature=4c02359068ec5a31cea3b633f6b5f9cf. Here we have video_file_id but not the actual videoId.

3

There are 3 best solutions below

0
On BEST ANSWER

You're using a deprecated upload method (the "resumable" PUT method), so its documentation is no longer available on the Vimeo Developer Site. Luckily, the Internet Archive has those docs saved.

After you make the final DELETE call to that endpoint, the video uri is returned in the location header of the response.

1
On

Pow, Brow, its correct!

Location: /videos/555380765

{Connection: keep-alive Server: nginx Cache-Control: no-store, no-cache, private Strict-Transport-Security: max-age=31536000; includeSubDomains; preload Location: /videos/555380765 X-RateLimit-Limit: 500 X-RateLimit-Remaining: 499 X-RateLimit-Reset: 2021-05-26T19:57:59+00:00 Request-Hash: 2461d148 X-BApp-Server: api-v10808-f5ldq X-Vimeo-DC: ge Accept-Ranges: bytes Via: 1.1 varnish, 1.1 varnish Date: Wed, 26 May 2021 19:57:00 GMT X-Served-By: cache-bwi5155-BWI, cache-cgh11141-CGH X-Cache: MISS, MISS X-Cache-Hits: 0, 0 X-Timer: S1622059020.784666,VS0,VE594 Vary: Accept, Vimeo-Client-Id Content-Length: 0 Content-Type: text/html; charset=UTF-8

}

0
On

I had to hunt around for this one too, so for other stuck on this:

check https://developer.vimeo.com/api/reference/videos#complete_streaming_upload

essentially you have to make DELETE req to:

https://api.vimeo.com/users/{userId}/uploads/{ticketID-or-uploadID}?signature={signature}&video_file_id={videoFileID}

the video ID is returned as Location header ie. /videos/{video_id}

signature and videoFileID are in 'upload_link_secure' or 'upload_link' links that are returned in the response payload when creating upload ticket / upload authentication.

Good luck :)