Get Started with the Vimeo API

Learn about Vimeo resources and how to sign-up and get authenticated for Vimeo services.

Vimeo API offers a lot of services related to different tasks and operations. This course covers the four most important services, as shown in the diagram below:

A brief description of these resources is as follows:

  • Categories: A category defines a set of videos that belong to a specific genre.

  • Channels: This resource arranges videos based on their theme or some other criteria and groups them into channels.

  • Videos: Videos are the main content on Vimeo.

  • Groups: Groups are the places like communities where the members can share, discuss, and collaborate on videos according to their likeness.

Next, we'll see the sign-up process of Vimeo and how to get authenticated to use Vimeo API services.

Sign up and create an application

You can sign up on the Vimeo platform with the following steps:

  • Provide a name, email ID, and password.

  • After you have entered your information, a survey form is shown. You can either fill out the form and continue or skip the form.

  • The next screen will show Vimeo’s pricing plan; click "No thanks," and it takes you to the home page of Vimeo.

A verification email is sent to the registered email ID. Click the link to verify the account.

Next, let’s create an application and generate an access token. To create an application, visit the Vimeo developer page and follow the steps below:

  1. Click "Create an app."

  2. In the required "App name" field, name your application.

  3. Briefly explain your application in the next required field, “App description.” The users see this description when your application asks permission to access their account.

  4. Next, decide about the access permissions for your application. Select the "No" option, check the agreement statement, and click the "Create App" button.

Congratulations! Your application has been created.

Generate an access token

Next, we’ll generate an access token for the application. Follow the steps below to generate a token:

  1. On the setting page of your application, navigate to the "Generate Access Token" section.

  2. Here, you see two options, "Authenticated (you)" and "Unauthenticated." The "Authenticated:" option will allow access to your private data—for this course, you’ll need to select this option.

  3. This will expand the "Scopes" section—check the "Private" scope in addition to the "Public."

  4. Once you have checked "Private," more scopes will appear. Check all of them and click the "Generate" button.

  5. This generates a token that is only visible for the first time. It is recommended to save this token somewhere safe.

Test our configuration and get USER_ID

To use Vimeo APIs, we need to send a request to the base_url shown in the code block below:

base_url = https://api.vimeo.com/

Click the edit button in the widget below and save the copied token as AUTH_CODE to use it throughout the course. Next, test our authentication code by executing the code widget below, which automatically extracts the user ID and assigns it to USER_ID. Click the "Save" button, so we have the user ID available for use throughout the course.

Press + to interact
// Importing libraries here
const fetch = require('node-fetch');
// Define endpoint URL here
const endpointUrl = 'https://api.vimeo.com/me';
// Define API key here
const API_KEY = 'Bearer {{AUTH_CODE}}';
// Define Header Parameters here
const headerParameters = {
authorization: API_KEY,
'Content-Type': 'application/json',
};
// Setting API call options
const options = {
method: 'get',
headers: headerParameters,
};
// Function to make API call
async function testAPI() {
try {
const response = await fetch(`${endpointUrl}`, options);
if (response.status === 200) {
console.log('Congratulations! You have been authenticated successfully.');
console.log("The URI of the user's account is: ");
printResponse(response);
}
else {
printError(response.status);
}
} catch (error) {
// Printing error message
printError(error);
}
}
// Calling function to make API call
testAPI();