Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7494309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:27:34+00:00 2026-05-29T17:27:34+00:00

I am building an application that would record what people say, generate an audio

  • 0

I am building an application that would record what people say, generate an audio file and upload it to SoundCloud and get the URL of the uploaded track using Python.

I used PyAudio to record and generate an audio file – a wave file.

But I need to know how to upload the file to SoundCloud. By research I found there is a Python wrapper for SoundCloud API and with Python library Poster, one can easily upload files to SoundCloud.

How do I do it? I have not used this API thing before and I don’t find a proper tutorial or a guide to how to make use of it. So if anybody can help me with this, please answer my question here.

How to use this SoundCloud Python API wrapper to upload files to SoundCloud using Python with the help of the Python library Poster?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:27:44+00:00Added an answer on May 29, 2026 at 5:27 pm

    We just released a new Python API wrapper. You can get it on PyPi or from our Github account. To upload a track, you’ll want to first get an access token using one of the supported OAuth2 auth flows. You can read about that in the README file. Let me know if you want me to elaborate on auth and I can edit my answer.

    To get an access token, first register your application on soundcloud.com. You will need to provide a URI that users will be directed to after authorizing your application and you will be given a client id and client secret. Once you have those credentials, pass them to the Client constructor:

    import soundcloud
    client = soundcloud.Client(client_id=YOUR_CLIENT_ID,
                               client_secret=YOUR_CLIENT_SECRET,
                               redirect_uri="http://your/redirect/uri")
    

    You’ll then be able to redirect the user to the authorization URL in order to authorize your app. The user will be sent to soundcloud.com to log in (if they do not have an active session) and approve access for your app. Depending on the framework you’re using (e.g. Django, Flask, etc) it could look something like this:

    return redirect(client.authorize_url)
    

    After approving access for your app, the user will be redirected to the redirect uri you specified when registering your app and in the constructor. The URL will have a query string that includes a ‘code’ parameter which you can then use to obtain an access token. Again, depending on the framework you’re using, this could look like this:

    code = request.params.get('code')
    token = client.exchange_token(code)
    print token.access_token  # don't actually print it, just showing how you would access it
    

    You should probably store the access token (i.e. in some kind of data store like MySQL or Redis) so you can use it whenever that user wants to access SoundCloud in the future.

    Once you’ve got an access token, uploading a track should be pretty simple. Once you’ve got your audio file, just send a POST request to the tracks resource. Here’s an example:

    import soundcloud
    
    client = soundcloud.Client(access_token='YOUR_ACCESS_TOKEN')
    track = client.post('/tracks', track={
        'title': 'The title you want to give your track',
        'sharing': 'private',  # make this 'public' if you want
        'asset_data': open('yourtrack.mp4', 'rb')
    })
    

    You’ll get back a track resource, which you can then use to get the Soundcloud URL:

    print track.permalink_url
    

    Hope that helps! Let me know if you have any questions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an application that handles image upload, when the image is uploaded I
I am building a DLL that another application would use. I want to store
How would i go about building a application that lets users see books that
I'm building an application that needs to use a web server like a file
Fellow StackOverflowers, we are building an iOS application that will record data which will
I'm currently building an application that would recommend website base on their tag. On
Background: We're building an application that allows our customers to supply data in a
I'm building an application that uses an elaborate API to fetch data from Youtube,
I'm building an application that is used by several different customers. Each customer has
I'm building a application that sends a test message to another email, the program

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.