Vimeo API - Embed/Get unlisted and hidden videos without user having to log in

56 Views Asked by At

I am developing a website for a client who want to embed their Vimeo videos onto the website for users to view.

I created an app on their Vimeo account and have the Client ID, Client Secret and Access Token (the scope is set to Public, Private and Video links) which I use to make a request on the website to get all available videos.

The Vimeo documentation and helpdesk explains that for Hidden, Unlisted and Passworded videos; the user does not need to log in to view the videos and also that they can be embedded into other websites.

However, when I retrieve the videos, the embedded videos explain that the user will need to log in to view the video. I'm trying to wrap my head around how I can just embed the videos onto the website without logging in, or perhaps using the Access Token or secret or something to authenticate the App (website) without the user needing to log in.

Here is my code for constructing the Vimeo object and request:

const Vimeo = require('@vimeo/vimeo').Vimeo
this.vimeoClient = new Vimeo(this.$config.vimeoClientId, this.$config.vimeoClientSecret, this.$config.vimeoPrivateAccessToken)
this.vimeoClient.setAccessToken(this.$config.vimeoPrivateAccessToken)


const vimeoRequest = await this.vimeoClient.request({
    method: 'GET',
    path: '/users/********/videos',
    headers: {
      Authorization: 'Bearer ' + this.$config.vimeoPrivateAccessToken,
    },
    query: {
      page: this.currentPage,
      per_page: 15,
      sort: 'date',
      direction: 'desc'
    }
  })

Can anyone please help me out?

0

There are 0 best solutions below