3

My requirement is very simple. I am an Vimeo Pro user and I have few private videos in my account and I just wanna play it in my private app.

How to achieve this.. Is it really I should to go thru all Oauth authentication process else by simply using accessToken I can access my videos. ?

I just want exactly how bright cove works they provide a token and video Id for video which I uploaded and using this I can play video in my app. Is it this thing not possible with vimeo.

Awaiting for suggestions

Alfie Hanssen
  • 16,964
  • 12
  • 68
  • 74
nik
  • 2,289
  • 6
  • 37
  • 60

2 Answers2

5

You can use the VIMNetworking library. This is the official Vimeo iOS SDK. Check out the Lightweight Use section for info on providing your own auth token.

Use the library to request the JSON for your video objects, grab the playback URLs from the "files" array on the video object JSON, and pass those to an AVPlayer instance.

Cool?

Side note: we (Vimeo) are working on a brand new 100% Swift replacement for VIMNetworking. Look for that in the coming weeks.

Alfie Hanssen
  • 16,964
  • 12
  • 68
  • 74
3

Only your access token is required when making API calls.

Create your Token

  1. Do you already have an API Application? If not you can create one here.
  2. Go to the "Authentication" tab on your API Application's details page.
  3. Scroll to the bottom and generate an access token with the API scopes you need (if you just need video file access, you will only need private + public scopes)

Use your Token

The token should be passed through the Authorization header like so: Authorization: Bearer {access_token}

Request all of your Videos

To get all of your videos, make an HTTP GET request to https://api.vimeo.com/me/videos.

Find your video file URLs

To find your video files, look in the files key of each of your videos. That will contain a url to the each file, and other useful information.

Dashron
  • 3,968
  • 2
  • 14
  • 21
  • Yes I generated access token but VIMVideoPlayer SDK it says invalid video file formate and doc says it only plays mp4 file formate videos – nik Feb 24 '16 at 06:04
  • What information are you providing to the VIMVideoPlayer SDK? Can you share an example link? If you want to keep it private you can contact vimeo at https://vimeo.com/help/contact – Dashron Mar 30 '16 at 16:04
  • @Dashron What if you are authenticating as a PRO user and the files property is nil? I am using swift – cacodev May 18 '16 at 18:53
  • That doesn't sound right. Can you reach out to us at vimeo.com/help/contact with your access token? We can help you dig into it. – Dashron May 19 '16 at 17:35
  • Can we get private video using this authentication used in API? – Vivek Goswami Sep 11 '17 at 10:33