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

soundcloud.app.goo.gl/* links cannot be resolved with oEmbed #41

Open
alekzhang opened this issue Mar 19, 2021 · 6 comments
Open

soundcloud.app.goo.gl/* links cannot be resolved with oEmbed #41

alekzhang opened this issue Mar 19, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@alekzhang
Copy link

Title: soundcloud.app.goo.gl/* links cannot be resolved with oEmbed

Issue found of: March 19th, 2021

Endpoint(s):

  • GET https://soundcloud.com/oembed?url=soundcloud.app.goo.gl/*

Scope(s):

  • None (application is not using authentication i.e., implicit flow)

Steps to reproduce:

curl "https://soundcloud.com/oembed" -d 'format=json' -d 'url=https://soundcloud.app.goo.gl/oHaE9jAAhVbuAB7g8'

Expected behaviour:

An oEmbed response is returned with information about the resource referenced by soundcloud.app.goo.gl/*

https://oembed.com/providers.json shows

    {
        "provider_name": "SoundCloud",
        "provider_url": "http://soundcloud.com/",
        "endpoints": [
            {
                "schemes": [
                    "http://soundcloud.com/*",
                    "https://soundcloud.com/*",
                    "https://soundcloud.app.goog.gl/*"
                ],
                "url": "https://soundcloud.com/oembed"
            }
        ]
    }

Perhaps https://soundcloud.app.goog.gl/* should read https://soundcloud.app.goo.gl/*

Actual behaviour:

Empty response (consistently)

@rahul-sc rahul-sc added the bug Something isn't working label Mar 22, 2021
@rahul-sc
Copy link
Contributor

Interesting that you're running into this case.

How are you getting hold of the short urls and could you perhaps explain a bit your use case, please?

@alekzhang
Copy link
Author

soundcloud.app.goo.gl links are exported from the Soundcloud App when sharing a track via link. I am working on improving display of URLs shared in a messaging application and I would like to use oEmbed for Soundcloud link previews

@alekzhang
Copy link
Author

@rahul-sc any updates here?

@rahul-sc
Copy link
Contributor

Hey @alekzhang this is not a use case we had intended to cover as these URLs are not actually served via our API. This is currently not a focus at the moment. We may reconsider if there are more folks that need this.

@amanduslindstrom
Copy link

amanduslindstrom commented Oct 2, 2021

Hey @alekzhang this is not a use case we had intended to cover as these URLs are not actually served via our API. This is currently not a focus at the moment. We may reconsider if there are more folks that need this.

More folks need it;)

@amanduslindstrom
Copy link

amanduslindstrom commented Oct 2, 2021

function get_shorten_url($url) {
				$headers = get_headers($url, 1);
				$url = $headers['Location'];
				if (is_array($url)) {
					foreach ($url as $url) {
						echo $url . "\n";
					}
				} else {
					echo $url;

Code above solved it, props to https://w3guy.com/original-url-shortened-link-php/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@alekzhang @rahul-sc @amanduslindstrom and others