New uploads not refreshing to Advanced API call (Vimeo Plus Account) - vimeo

How long should I expect to wait until a video I uploaded to an album shows up through my API call?
It has been 3 hours since the "processing" on Vimeo was completed, and it's still not showing up. It only shows up on the Vimeo website directly.
I am on a Vimeo Plus account.

If you are making an authenticated API request to see your own list of videos, and you were the user who uploaded the video, you should see the video as soon as you have completed the upload.
Basically if you can see it on site, you should see it in the API.

Related

Creating Video with Private Link via API

I'm scoping out a project with the Vimeo API in which a user uploads a protected video.
I see the API allows for uploading a video with a password via privacy.view.
However, Vimeo also has the ability to upload a video that's only sharable with a private link. I'm not seeing a reference in the API that indicates it's possible to create this via the API. Basically, a user would upload a private video and the API returns the "private link" for that video.
I was hoping someone with more expertise might be able to confirm.

Google Slides video access via 'access_token'

My app requests the 'https://www.googleapis.com/auth/drive.readonly' permission from a user. When the app gets a Google access token, a url is built to access a user selected Google Slides presentation preview, something like:
https://docs.google.com/presentation/d/1WADAfZShdqdYKgae8C9LdpYlPgf2qjoZD2jjKln4F3M/embed?rm=minimal&access_token=ya29.....
This works great to view the presentation, but if a video is used on a slide, then follow error shows:
Since my app is requesting full read access to a user's Google Drive, and the video in question is in the user's Google Drive, why is this happening?
This is happening because you still have to let other users have access to your video itself, therefore you need to share it to them like you would do it with any other kind of file inside your Drive.
To do it programmatically, you will need to use the Drive API and build a request in the Files: update enpoint like this:
[
{
'type': 'user',
'role': 'writer',
'emailAddress': 'user#example.com'
}, {
'type': 'domain',
'role': 'writer',
'domain': 'example.com'
}
]
Edit
For what I could understand now. To be able to see the video, do the following:
1) Right-click on the video.
2) Click Share.
3) Click "Advanced" (It is in the right-bottom corner).
4) Click "Change...".
5) Choose "On -Anyone with the link" and set the access as "Can Edit".
When you use the "access_token" query parameter Google Slide is going to search for the video's URL in the Driver, which you have to set shareable permissions to the video.
Images can be accessible from anyone who has access to the presentation as the doc says:
An URL to an image with a default lifetime of 30 minutes. This URL is
tagged with the account of the requester. Anyone with the URL
effectively accesses the image as the original requester. Access to
the image may be lost if the presentation's sharing settings change.
Videos have to have the sharing settings configure as the doc says:
An URL to a video. The URL is valid as long as the source video exists
and sharing settings do not change.
Notice the difference between the two here: Anyone with the URL effectively accesses the image as the original requester.
Update
I am updating my answer because I came across this, which states authorizing your requests through the access token query parameter to connect to the Drive API will be deprecated starting January 1, 2020.
Therefore your requests now will need to be made using an HTTP header.
My answer should be considered a workaround because it will be deprecated soon.
Docs
You can find more info about the Slides API and Drive API in the following links:
Drive API v3.
Share files, folders and drives.
Slides API.
Pages, Page Elements, and Properties.
Although you have stored your video in the same drive location alongside your presentation, I guess it might not be accessiable when it is "embedded within your slides".
However, you would be able to access the video if you use the same access token to see the video alone.
It would be better to store videos separately, embedded them in your presentation and then access them using their respective scopes instead.
if you choose to take this route then,
I think you need to allow the following scopes as well to access your video from the presentation viz drive.photos.readonly, youtube.force-ssl respectively. Alongside your other drive scopes, provided you have stored videos in either of the 2 ways mentioned below.
Hence, at the time of access_token request, use the relevant scopes and get the access token and use the same for accessing your resources at a later point in time.
2 options,
When using Drive API
https://www.googleapis.com/auth/drive.photos.readonly
View the photos, videos and albums in your Google Photos
When using Youtube
https://www.googleapis.com/auth/youtube.force-ssl
See, edit, and permanently delete your YouTube videos, ratings, comments and captions
Google API documentation -
https://developers.google.com/identity/protocols/googlescopes

Access Google Photos through Google Drive is not working

We've been using Google Drive to fetch Google Photos metadata and to access photos through the following url
https://drive.google.com/thumbnail?authuser=0&sz="size"&id="photoId"
with the correct access token.
Metadata continues to work and drive url is giving a 404 http error (not found).
It was working ok, until some days ago (i.e. we first noticed it 2017/12/14). Probably this is related with changes going on with drive.
Is this an expected behaviour? What is the correct API to access Photos now?
You may refer with this thread. Try to clear your cookies and cache, use an incognito/private window, disable all browser extensions/add-ons/plug-ins and/or try a different browser to see if this is a browser related issue.
this is happening in production on an iOS app and we do have multiple users complaining every day.
As a test case we did the following:
1 - go to Google Photos app and did check the option to show photos & videos in Google Drive;
2 - try to clear safari history;
3 - login again.
The result is the following:
1 - we do have success requesting several pages with photo-metadata through Google Drive api v3;
2 - Through the id that we get for each photo we do try to request an image for a specific size through
https://drive.google.com/thumbnail?authuser=0&sz="size"&id="photoId"
Step 2 fails with a http 404 and did not change nothing on our side. It is happening in all devices that we tested, which means that something changed or is not working properly with drive.
Meanwhile we've been told by someone (not Google) that Google Drive is no longer the best way to access Google Photos. Because this data source is in our product, it is important to know what is the correct / best api to access Google Photos now.

Using vimeo API, can I get the video URL before upload is complete?

When having users upload videos to my vimeo via a form in a WordPress blog, can vimeo return the video URL (to use in the code) before the video upload is actually finished?
No, this is not possible.
The resources required to define an upload url are all created during the completion step of an upload (in POST uploads this is the first redirect to vimeo.com, in PUT uploads this is the DELETE request).
This allows us to verify that you have uploaded a video (and not a text file, or image), and verify that the upload has completed, and is successful, before assigning a URL.

getting videos in google drive (and Microsoft onedrive) to show in a video tag?

I have a website that has a web page with a html5 video-tag, and the user can supply a URL, and it will play in the video-tag.
The webpage uses JavaScript commands that control the video-tag - for instance, it can pause the video, move to a different point in the video, etc.
It works fine with the cloud. Videos stored on Microsoft Azure can be used, for instance (Azure gives you a way to get a URL to any video on your cloud storage, and streams it too).
However, I have users that store videos on Google-drive, and also on Microsoft One-Drive.
From what I can see, I can play these videos, but only in a page (probably with Google's own player in it) on their site.
It seems that there is no way to get a URL to these videos that I can put in a video tag.
Without the ability to do that, I can't use the javascript commands that work with the html5 video-tag.
Is there any workaround?
Or am I missing something?
Thanks.
For playing videos that are stored in google-drive using your app:
you need oauth2 credentials to access the user's drive, but assuming you have the oauth part covered :
you can create a drive application as a google appengine app and deploy it in a part of your website.
enable the drive-sdk and set the open-url to your website (that you have verified)
-> basically this tells drive to redirect towards your website whenever the user clicks on the video (from his drive)
when drive redirects to your website a json file will be sent, you'll have informations such as fileId from there i think you can execute the method files().get() to retrieve the necessary information for you to play the video
I advise you to take a look at this course in codeschool.