Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Youtube video import no longer works #497

Open
boussou opened this issue Oct 9, 2019 · 2 comments
Open

Youtube video import no longer works #497

boussou opened this issue Oct 9, 2019 · 2 comments

Comments

@boussou
Copy link

boussou commented Oct 9, 2019

Describe the bug
Youtube video import no longer works.

url like this is generated by the plugin:

https://medium.iframe.ly/api/oembed?iframe=1&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D17ZPd17-iP4%26feature%3Dyoutu.be&_=1570655298549

answer from iframely is:

  1. a https cert error (!) -> net::ERR_CERT_COMMON_NAME_INVALID
  2. the following json:
{
    "status": 403,
    "error": "Valid api_key is required to access API"
}

I found out that you can access through http not https, but same pb, you still need an api key. 
@boussou
Copy link
Author

boussou commented Oct 9, 2019

you have to create an account on https://iframely.com/
Free level allows for Trial and 10 000 hits
1 000 hits/mo afterwords

then you have to add to the initalisation of the plugin the API key to the URL.
Something like "&api_key=…" as below:


defaults = {
            oembedProxy: 'http://medium.iframe.ly/api/oembed?api_key=XXXX&iframe=1',
            captions: true,
            captionPlaceholder: 'Type caption (optional)',
...etc

Replace XXXX by your own key given at account creation

@iparamonau
Copy link
Contributor

oembedProxy needs to be changed to the production-ready endpoint at //iframe.ly/..... The demo endpoint at medium subdomain was never meant for production, and has never had SSL certificate.

Regardless, we have fixed SSL certificate on Iframely demo endpoint, it should work out of the box. Just make sure that your SSL site sends referrer header if you don't supply api_key (by default browsers don't send ssl referrers).

@orthes this can now be closed. As well as #496

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants