Getting a SoundCloud API client ID - soundcloud

Encountered a problem accessing my tracks from browser.
Usually i type this link in my browser to access downloadable tracks:
http://api.soundcloud.com/tracks/294324164/download?client_id=02gUJC0hH2ct1EGOcYXQIzRFU91c72Ea
But now i can not access it anymore, probably the client id is changed.
How can i obtain a new client id?
Thanks.

Simple.. Go to any tracks that you can download on soundcloud, press f12 and look at networks tab, click download and it will show you something like
https://api.soundcloud.com/tracks/322109493/download?client_id=2t9loNQH90kzJcsFCODdigxfp325aq4z&oauth_token=2-274121-85658-y9KQYyZ6qG9oT2uvPq
Grab that client_id, replace it and amend the url from download? to stream?.. use streams? if you want a list of urls in json format
http://api.soundcloud.com/tracks/294324164/stream?client_id=2t9loNQH90kzJcsFCODdigxfp325aq4z

As no one else has mentioned it, in a Chrome-based browser under DevTools ctrl+shift+i, you can grab your client_id from the Network tab on reload. Many items listed here reference the SoundCloud API and require your client_id to access it. Simply click any item in the list that isn't an image/base64 item (preferably something that begins with id?...), then check the Request URL for a client_id.
It's the simplest way to grab the ID; now that you know how, don't do anything illegal k thx.
For those thinking this is the same as the other answer mentioning a download link, this method skips that entirely as many songs are no longer available from SoundCloud itself, but from external sources that are linked instead.
Amazing it's been this long, yet there's no "public" Soundcloud API. I'm amazed to find something worse off than the Twitch API.

See this user's solution for a way to do this without a CLIENT ID which you can no longer get from soundcloud: https://stackoverflow.com/a/27461646/179571

youtube-dl https://soundcloud.com/my-fav-artist
seems to work and pull all tracks as mp3
no client_id needed, if you needed the client_id to get something
like soundcloud-dl to work

You can apply for a client ID by filling in the SoundCloud Application Registration form.

Related

Get share/like count for different url/bogposts/articles

I am looking for a method to get share/like count for each of the blogposts/articles which I create on my website. Interested in Facebook, LinkedIn and Twitter but Facebook is the most important right now.
Lets take this website as an example: https://googleblog.blogspot.com/
I have found a method to find this out for each url, but that will make it a lot harder for me as I would need to do it manually for each URL.
This is the query I used to get data for a specific URL:
https://graph.facebook.com/v2.7/?id=https://googleblog.blogspot.no/
Is there any method to get data for each and every url which contains: "company name" or something like this?
Will appriciate all the help I can get here.
No, there is no “wildcard” for Open Graph object URLs.
You can however request data for multiple URLs in one go, using the ?ids=foo,bar syntax – https://developers.facebook.com/docs/graph-api/using-graph-api/#multiidlookup
This theoretically works for up to 50 ids in one request (although with the ids being URLs in this case, you might only be able to request less, due to URL length limitations.)

Dailymotion callback url dynamic configuration

I hope I am not duplicating a question. I am banging my head against a wall for several days now. I am adding the Dailymotion PHP SDK to our site, I am using the Dailymotion::GRANT_TYPE_AUTHORIZATION, I am able to authenticate using a static call back url in my API on Dailymotion.
I want to be able to use this from several different scripts on the site. The first will be to call a link up page, so we can capture that a person has linked to Dailymotion. The second will be to upload video's through our system to Dailymotion, to that users account, not mine. I know I could do this with the authentication type of password, but I want to use the API and not have to have the visitor sign in or enter their credentials every time.
Back to the question, I see that the API can have a dynamic url, but I can not figure out how to make this work. If I someone could send me an example of how to enter this in the API section I would appreciate it. This does not work:
http://example.com/dailymotion/[dailymotion_checklogin.php]
nor does something like this:
http://example.com/callback/[dailymotion_upload.php][dailymotion_checklogin.php]
I would appreciate any help.
Thanks
Mrpepik
Replace the [dynamic] part with your dynamic part.
If your redirect URI on your API key is http://example.com/dailymotion/[dynamic], then your real redirect URI could be http://example.com/dailymotion/dailymotion_checklogin.php

Getting Facebook event information from URL

I've been reading some stuff about Facebook API's but as a non-programmer it's kinda hard to understand it all. It's probably a pretty simple question.
My question: is it possible to get all the information like coverphoto, time, description, location etc. from a (random) public Facebook event from just the URL of the event?
So I will have a field 'Insert event URL' on my page. Below that I will have some fields like 'Location' 'Start time' 'End time' which will be automatically filled in when the user inserts the URL of an event.
Please let me know! A link to the source with explanation etc. would also be really nice. (It's for a school project)
Yes you can. Ill try to explain you the simplest possible way to do that.
First of all go to : http://developers.facebook.com/apps and create an app.
Then, save the App access token which is: app_id|app_secret
Your url will be of format: https://www.facebook.com/events/{event-id}. Fetch the event id from this. Quite simple right?
Then you are going to use the facebook's powerful graph api. Just get the contents from : https://graph.facebook.com/{event-id}?access_token={app-access-token}
The list of all possible fields that you can get (only if set in the event of-course): https://developers.facebook.com/docs/graph-api/reference/user/events/#pubfields
That's it!

Send link (or other) such that form is already filled out

Is there a way to send some a url (or other thing) to a site such that data in a form is already filled out? This is not to my own site that I control.
For example, I want to send a link to some airline flights and want to have the destination and date be automatically filled out when the link is opened.
I'm guessing not, but have gotten lucky here before :) Maybe with some kind of program or add-on or??
If its written with GET method so just try to play with the site and just put the url with all the args you found.
If it is POST, so you need to create an add-on or pretend to a browser, search the net for this kind of solution.
No, that's not possible, if the remote site is not ready for that.

How does facebook's Share a link feature work?

I'm trying to implement a feature like that where a user inputs a url and when displaying that url I want to have a custom display (an embed object if it's a video from youtube, a thumbnail if it's an image link, title and excerpt of body if it's a normal link).
How can such a feature be realized?
There is a new idea called oEmbed that a few sites support (Flickr, Vimeo and a few others) that addresses this problem. oEmbed site
Otherwise, just check the site against a list of ones you pick and then pull out the relevant bits to construct an embed link.
I liked the idea of oEmbed a lot but unfortunately it doesn't has that much adoption yet.
oohEmbed tries to solve this issue by building oEmbed for many websites.
For the feature to work, it needs the server's interaction where I believe the following scenario is how it works
Assume that we have the site humanzz.com and that it provides such feature
A user enters a url on the humanzz.com's webpage and presses a button like facebooks' preview button
An AJAX call is made to a dedicated page on humanzz.com
humanzz.com does calls the remote website and gets its data
The AJAX call now returns the page's data (oEmbed JSON object)
This involves so much server's overhead.
I really wanted to do it using JavaScript as the server's role was only to bypass "Same Origin Policy"'s restrictions.
oohEmbed allows bypassing the server's step by specifying a callback parameter to oohEmbed so that the JSON object returned is passed to a callback function on your page.
An example illustrating this is as follows
Add a script tag dynamically to your page
< script type="text/javascript" src="http://oohembed.com/oohembed/?url=http%3A//www.amazon.com/Myths-Innovation-Scott-Berkun/dp/0596527055/&callback=myCallBack">< /script>
This would result in executing myCallback(oEmbedJSONObject) which is great.
The problem with that solution is you still have to have a fallback for websites that don't have oEmbed representations.
For the embedded things, I have been using auto_html ( https://github.com/dejan/auto_html) with great success (vimeo, youtube, images) and even added soundcloud myself. But I am still looking for a "thumbnail" generation with an image and text facebook-like.
I guess you have to construct it by yourself by manually parsing the kind of URL you get.
If it is an image url, well then you just have to rescale it and in case the user clicks on it, then handle that by opening the original one somehow.
If it is a link to some youtube video, then you have to take a look at how the embedding of Youtube videos works. You can just copy the code that is provided by Youtube itself, and then exchange the parts with the URL to the video with the URL you got from your user.
I did never implement something like that, but I assume it should work somehow like this.