Allow users to upload and share sounds
SoundCloud API enables developers to build applications for uploading, playing, and engaging with tracks on SoundCloud.
import requests
url = "https://api.soundcloud.com/tracks"
headers = {
"Authorization": "OAuth YOUR_ACCESS_TOKEN"
}
files = {
"track[asset_data]": ("audio.mp3", open("audio.mp3", "rb"), "audio/mpeg")
}
data = {
"track[title]": "My Awesome Track",
"track[sharing]": "public"
}
response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())Last 50 checks (10 min intervals)