Vimeo api get hidden video - vimeo

I am using Vimeo php library: https://github.com/vimeo/vimeo.php
I have created app on Vimeo and generated token and secret.
I can sucessfully retrieve normal video from Vimeo using following:
$result = $vimeo->request("/videos/$video_id", array(
'fields' => 'uri,name,description,download,link,duration',
));
However when I try to retrieve which is hidden from Vimeo in privacy settings: https://vimeo.zendesk.com/hc/en-us/articles/224817847-Manage-your-video-s-privacy-settings
For example, this video: https://vimeo.com/354438711
I get 404 {error: "The requested video couldn't be found."}
The same is true if I try in their api explorer: https://developer.vimeo.com/api/reference/videos#get_video
But this is not my video, I am testing video from a client. I dont have plus account to be able to set video privacy to hidden.
My client can get video using api explorer, but not using Vimeo php library.
Is it possible that api cannot retrieve hidden video?

Related

Flutter How to get Instagram posted video/image URL from a copied/share link with shortcode via InstagramBasicDisplay

Usually they use '?__a=1' to get json data but I can't get a followed 'private' media url from it. But I have the access token, is there any way or endpoint that I can refer to with access token so that they can download a media from a "FOLLOWED" private users from a copied/share link?

Embedding Vimeo password protected vidoes on a white-listed domain

I know this question has been asked before:
Vimeo - Sending password via javascript api
Show password protected Vimeo video without password
How to embed a password protected video by sending password through vimeo GET API 3 c#
But an year or more has passed since each question was asked and we are hoping Vimeo might have improved things/API as multiple users seem to be having the same requirement.
We are evaluating Vimeo for a client's video hosting needs and everything seems perfect and in-place. We will be doing custom integration and hence would be using their API as well as Player SDK to embed Vimeo videos into our portal.
However there's only one missing link we are trying to figure out:
Vimeo allows a video to be unlisted from vimeo.com and only shown in whitelisted domains; which is perfect. We would be using this feature.
However Vimeo further allows videos to be password protected. But when playing via the Player SDK, Vimeo always prompts the user for password which basically defeats the whole purpose of password protection. We have paid content videos and if we share password with one user; there's nothing preventing the user from distributing the password further.
The answers provided on questions above suggest making the videos private and show only on whitelisted domains. But won't the same be subject to header spoofing attacks?
I would have assumed Vimeo's oEmbed API would have enabled us to sending the password for the video from our server and then vimeo returns a one-time playback link for the video which we could have rendered on the web using the Vimeo's Player SDK. Thus providing even better protection for paid content/commercial videos.
However I see no such option being mentioned in the Player SDK/oEmbed API docs.
So is anyone aware of an option where a Vimeo password-protected video can be embedded on the page of a whitelisted domain and the password transparently shared with Vimeo by our server so the user does not need to input the password in the video itself?
The answer to below would give you a clear picture :
I would have assumed Vimeo's oEmbed API ...
Once you have whitelisted the domain or an Ip address, that computer or server is allowed to access resources, below request is taking your IP or domain to Vimeo, checking as per whitelist rule and return the required JSON that has everything most important is html that has a secured URL
https://vimeo.com/api/oembed.json?url=https://vimeo.com/videso/45215485
this is barrier based, would return you below JSON:
{
"type": "video",
"version": "1.0",
"provider_name": "Vimeo",
"provider_url": "https://vimeo.com/",
"title": "ReflectionVOID",
"author_name": "Page Films",
"author_url": "https://vimeo.com/pagefilms",
"is_plus": "1",
"html": "<iframe src=\"https://player.vimeo.com/video/204420014\" width=\"640\" height=\"272\" frameborder=\"0\" title=\"ReflectionVOID\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>",
"width": 640,
"height": 272,
"duration": 345,
"description": "",
"thumbnail_url": "https://i.vimeocdn.com/video/621081707_640.jpg",
"thumbnail_width": 640,
"thumbnail_height": 272,
"thumbnail_url_with_play_button": "https://i.vimeocdn.com/filter/overlay?src0=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F621081707_640.jpg&src1=http%3A%2F%2Ff.vimeocdn.com%2Fp%2Fimages%2Fcrawler_play.png",
"upload_date": "2017-02-16 15:03:43",
"video_id": 204420014,
"uri": "/videos/204420014"
}
That's what I just have concluded.

access stats using the vimeo API

i want to access the vimeo stats with the vimeo API to automatically get a list of the most viewed videos.
i am trying to access https://api.vimeo.com/me/videos/stats with an access token, but i get the following error.
{
"error": "Your access token does not have the \"stats\" scope"
}
is it not possibile to access the stats using the API, because i can't find a scope named "stats"? it only works from the stats admin page where i can download the stats export as an csv.
i read in a post from over a year ago that the stats api is not available yet, does anyone know if this is still the case, i could not find anything in the vimeo docs.
Stats are still unavailable via the Vimeo API.

Is it possible to playback a RingCentral call recording using a HTML5 audio element?

When using the RingCentral Call Log to access call recording audio files, a contentUri is provided in the response.record[x].recording object which points to a binary form of the call audio. The API's Authorization header is still necessary to retrieve this file.
Is it possible to play this back in a web app using a HTML5 audio element so we don't have to host/upload to call audio to our own system. It seems like this would need to avoid using the Authorization header and supply authorization in some other fashion. For example:
<audio src="https://media.ringcentral.com/.../recording/{recordingId}"></audio>
More information on the HTML5 audio element is available here:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
It is possible to playback a RingCentral call recording with using an HTML5 audio element without downloading and hosting the audio file yourself. Authorization is still required so it must be passed using an approach other than the HTTP header.
Two approaches include:
1) Access Token in Query String
You can append the access token to the media URL as a query parameter so you have something like:
<audio
src="https://media.ringcentral.com/.../{recordingId}?access_token=MyToken">
</audio>
A caveat with this approach is that the URL will stop working when the access token expires, typically in one hour or less. This is useful for ephemeral links such as time-sensitive links in a chat stream, however, less so if the link needs to be retrieved later. For that, see the following approach.
2) Access Token in Cookie
If you want a permanent URL that doesn't expire, you can use a proxy service that manages the authentication for you. One way to do this is to use the RingCentral cookie-based Implicit Grant OAuth flow to transmit the access token to the proxy service. This way, when attempting to retrieve a media file via URL (without token), the proxy service can check if the cookie is present and valid. If it isn't, the proxy service can prompt for a successful Implicit Grant login before forwarding to the call recording media file. An example implementation of this is available here:
https://github.com/tylerlong/permalink

Authorization scope issues despite passing "scope" parameter

I am experiencing issues requesting "upload" authorization from Vimeo users OTHER than the user that created/registered the app.
Example:
User-A creates/register's new App-A via the Vimeo developer console. User-B is asked to authorize App-A to upload on their behalf. User-B is redirected to Vimeo authorization UI and sees the following:
This app will enable you to:
Access all of your videos
This app will not allow you to:
Like videos
Update your video info
Upload videos to your account
Delete your videos
Despite specifying scope in the authentication request URL:
https://vimeo.com/oauth/authorize?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&locale=en_US&oauth_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&redirect_uri=https%3A%2F%2Fxxxxxxxxxxx.xxxxx.com%2Fapi%2Fauth%2Fvimeo%2Fverify&response_type=code&scope=upload&state={%22sessionId%22%3A%2243a9a9d1a7bd44d5a27d0f91b6185875%22}
BUT...
If I send the same request, but login as User-A instead then:
This app will enable you to:
Access all of your videos
Upload videos to your account
This app will not allow you to:
Like videos
Update your video info
Delete your videos
Am I missing something obvious?
Check the upload permissions you have been granted. If you only have owner permission, you can only request upload scope for the app owner.
If you have additional permissions, they are based on the target users subscription level.
If you think you should still be able to upload, or if you need additional upload permissions you will need to contact vimeo directly at vimeo.com/help/contact