Integrating Vimeo API into my private app

7.3k views Asked by At

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

2

There are 2 answers

3
Alfie Hanssen On BEST ANSWER

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.

5
Dashron On

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.