You can embed Vimeo in Apostrophe right out of the box using the embed code feature. But you can also get tighter integration with Vimeo, with support for Vimeo searches from within Apostrophe and linked Vimeo accounts. Linked accounts automatically populate Apostrophe's media repository so they are particularly useful.
This support is similar to that provided for YouTube, however unlike YouTube Vimeo does require that you obtain an API key for your particular site.
Your site only needs one API key for Vimeo, no matter how many Vimeo accounts you link it to.
To obtain an API key, first create a Vimeo account and log into the vimeo.com site. Note: if you are building a client site, the client should do this, or you should create a special Vimeo account on their behalf. Do not use a single API key for many clients. Then, visit the Vimeo "new applications" page and fill out the form, describing your intended use of Vimeo on your website.
Once you complete the process you will be given two pieces of information:
You will need to add both of these pieces of information to your project's app.yml file, like so:
all: a: vimeo: oauthConsumerKey: xxxxxxxxxxxxxxxxxxxxxxx oauthConsumerSecret: xxxxxxxxxxxxxxxx
As always, run the symfony cc command after any change to app.yml.
Now you should be able to use Vimeo directly from within Apostrophe, in the following ways:
You'll be shown a selection of matching videos, and you can select any of them to add to your Apostrophe site's media repository.
You'll be shown a selection of videos to confirm that this is the correct account. Confirm and the account will be linked to your site.
The next time and every time the apostrophe:update-linked-accounts task is run, all videos in that account will be synced to your Apostrophe media repository. Tags are included in the sync, so you can use the smart slideshow feature to automatically embed relevant videos at any point in your site.