Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hidden videos in showcase not returned with api #321

Open
aproni34f opened this issue Sep 21, 2022 · 7 comments
Open

hidden videos in showcase not returned with api #321

aproni34f opened this issue Sep 21, 2022 · 7 comments

Comments

@aproni34f
Copy link

I have a showcase with videos hidden in privacy settings.

When I try to query to get all videos I get empty response.

https://api.vimeo.com/users/USER_ID/albums/ALBUM_ID/videos?access_token=TOKEN

I just get empty results.

Is api not meant to return hidden videos?

@aaronm67
Copy link
Collaborator

aaronm67 commented Sep 21, 2022

You need to use an access token authenticated to your user with the private scope to access private videos.

This also means you cannot pass the access token by the ?access_token query parameter.

You can generate a new access token on the developer site, https://developer.vimeo.com/, and access private videos in the showcase using

GET https://api.vimeo.com/users/USER_ID/albums/ALBUM_ID/videos
with headers
Authorization: bearer <the_token_generated>

@aproni34f
Copy link
Author

I am actually using vimeo php library: https://github.com/vimeo/vimeo.php

$vimeo->request("/users/$user_id/albums/$album_id/videos");

But I am not talking about private video, but Hide from Vimeo videos:

https://vimeo.zendesk.com/hc/en-us/articles/224817847-Manage-your-video-s-privacy-settings

@aaronm67
Copy link
Collaborator

aaronm67 commented Sep 21, 2022

This applies to both hide from Vimeo and private videos.

The PHP library will automatically add the authentication header for you, but you do need to use a private, authenticated token. You also can't pass the token via query string - in the PHP library, you need to use, ex,

$client = new Vimeo(client_id, client_secret, access_token);
$client->request('/users/USER_ID/albums/ALBUM_ID/videos');

You will only see hide from Vimeo videos if the access token is authenticated to the user who owns the videos.

@aproni34f
Copy link
Author

aproni34f commented Sep 21, 2022

I do use it like this, but for token, I just generated new token with :

private public

scopes but I still get empty results.

Btw, this is my clients album I am trying to view, and he has higher user privileges. I am just basic user. Will this work? Or only album users can see hidden videos?

@aaronm67
Copy link
Collaborator

Only users who have permission to see the videos will have access to them.

You'll need to use either a token authenticated to the owner, or authenticated to some other user that has access to view them.

@aproni34f
Copy link
Author

How other user (in this case me) gets access to view them?

@aaronm67
Copy link
Collaborator

They can add you as a team member and grant you permission to either the folder or the videos they would like you to have access to.

There are some docs available on managing teams, https://vimeo.zendesk.com/hc/en-us/articles/224818687-Add-and-remove-team-members-on-your-account, but if they have issues they should reach out to support https://vimeo.com/help/contact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants