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 9283027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:31:32+00:00 2026-06-18T18:31:32+00:00

The soundcloud documentation has no sample for updating a playlist using java wrapper. I

  • 0

The soundcloud documentation has no sample for updating a playlist using java wrapper. I tried something like this but it didn’t update the tracks. And no error messages returned.

HttpResponse resp = wrapper
  .put(Request.to("/me/playlists/123")
  .with("playlist[title]", "updated title", "playlist[tracks]", "[
    {id: 10001},
    {id: 10002}
  ]"));

Any ideas?

  • 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-06-18T18:31:33+00:00Added an answer on June 18, 2026 at 6:31 pm

    The problem is that you’re using a mix of Rails style form parameters and JSON.

    There are two options:

    1) Only use form parameters:

    HttpResponse resp = api.put(Request.to("/playlists/123")                          
            .with("playlist[title]", "updated title")                         
            .with("playlist[tracks][][id]", 10001)     
            .with("playlist[tracks][][id]", 10002)); 
    

    2) Submit playlist data as JSON:

    private void updatePlaylist() {
        JSONObject json = createJSONPlaylist("updated title", 10001, 10002);
        HttpResponse resp = api.put(Request.to("/playlists/123")                     
            .withContent(json.toString(), "application/json"));
    }
    
    private JSONObject createJSONPlaylist(String title, long... trackIds) throws JSONException { 
        JSONObject playlist = new JSONObject();                                                  
        playlist.put("title", title);                                                            
    
        JSONObject json = new JSONObject();                                                      
        json.put("playlist", playlist);                                                          
    
        JSONArray tracks = new JSONArray();                                                      
        playlist.put("tracks", tracks);                                                          
    
        for (long id : trackIds) {                                                               
            JSONObject track = new JSONObject();                                                 
            track.put("id", id);                                                                 
            tracks.put(track);                                                                   
        }                                                                                        
        return json;                                                                             
    }                                                                                            
    

    Check out the tests in the wrapper to see them in action:

    • without JSON
    • with JSON
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using the soundcloud JAVA wrapper for the API i get the following SSL
When using the soundcloud JAVA wrapper for the API, ApiWrapper wrapper = new ApiWrapper(id,secret,
I tried to use this snippet from the Soundcloud API: <script src=http://connect.soundcloud.com/sdk.js> <script> SC.initialize({
The example track in the SoundCloud API /tracks documentation (http://developers.soundcloud.com/docs/api/reference#tracks) has a field attachments_uri,
I tried to use multiple soundcloud html5 widgets (iframes) in a javascript slider using
I am sure this question has been asked but I can't find anything that
I am trying to render a SoundCloud HTML5 widget using the PHP API, but
I'm having this use case I'm not figuring out by the soundcloud documentation page:
I've successfully followed Soundcloud's API documentation but hit an error that's got me stuck.
From: http://developers.soundcloud.com/docs/api/tracks#filtering I'm not sure from the docs if this functionality is available. I

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.