Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable access token for OEmbed Client #1225

Open
bpauli opened this issue Oct 27, 2020 · 2 comments
Open

Enable access token for OEmbed Client #1225

bpauli opened this issue Oct 27, 2020 · 2 comments
Labels
enhancement New feature, or improvement to an existing feature.
Milestone

Comments

@bpauli
Copy link
Contributor

bpauli commented Oct 27, 2020

Feature Request

Some oEmbed endpoints require an access token for embedding. For example:
Instagram: https://developers.facebook.com/docs/instagram/oembed/
Facebook: https://developers.facebook.com/docs/plugins/oembed?locale=en_US

The generic oEmbed URL processor doesn't provide a generic way to add this token to the request at the moment.

Describe the solution you'd like
If an endpoint needs an access token the URL processor should be able to make a lookup for an context-aware configuration which is providing this token for the request.

@msagolj msagolj added the enhancement New feature, or improvement to an existing feature. label Oct 27, 2020
@msagolj msagolj added this to the 2.13.0 milestone Oct 27, 2020
@bpauli
Copy link
Contributor Author

bpauli commented Oct 27, 2020

A possible workaround for the oEmbed endpoint of Facebook is to add the access token to the endpoint URL in the OSGi configuration. The Instagram configuration for example would look like:

provider="Instagram"
endpoint="https://graph.facebook.com/v8.0/instagram_oembed?access_token=72...%7C89..."
format="json"
scheme=["https?://(www\\.)?instagram\\.com/p/.*","https?://(www\\.)?instagr\\.am/p/.*"]
unsafeContext="true"

Note that the access token is a combination of {app-id}|{client-id} according to the official Facebook documentation but the pipe character needs to be provided in a uri encoded string {app-id}%7C{client-id}

bpauli added a commit that referenced this issue Oct 29, 2020
- add namespace for carousel component
- remove Facebook and Instagram test because of #1225
bpauli added a commit that referenced this issue Oct 29, 2020
- add namespace for carousel component
- remove Facebook and Instagram test because of #1225
msagolj pushed a commit that referenced this issue Oct 29, 2020
- add namespace for carousel component
- remove Facebook and Instagram test because of #1225
@msagolj msagolj modified the milestones: 2.13.0, 2.14 Dec 1, 2020
@msagolj msagolj modified the milestones: 2.14.0, 2.15.0 Jan 28, 2021
@vladbailescu vladbailescu modified the milestones: 2.15.0, 2.16.0 Feb 23, 2021
@vladbailescu vladbailescu modified the milestones: 2.16.0, Minor Apr 9, 2021
@RashidJorvee
Copy link

Hi @bpauli
I tried with the workaround as you suggested and now I am getting response 200 for Instagram request but everything is null and empty in response(Below is the screenshot). Is something wrong I am doing here?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, or improvement to an existing feature.
Projects
None yet
Development

No branches or pull requests

4 participants