Module soundcloud

ballerinax/soundcloud Ballerina library

2.0.0

Overview

SoundCloud is an online audio platform where artists and listeners share, discover and discuss music and other audio.

The SoundCloud connector lets Ballerina applications call the SoundCloud Public API (version 1.0.0) to search and manage tracks, playlists and users, read and post comments, and like, repost and follow content on behalf of an authenticated user.

Key features

  • Search tracks, playlists and users, and read their details
  • Upload tracks and create or update playlists
  • Read and post comments on tracks
  • Like, repost and follow tracks, playlists and users
  • Authenticate with OAuth 2.1 (client credentials, authorization code) or an access token

Setup guide

To use the SoundCloud connector, you need an access token for the SoundCloud API.

  1. Sign in to SoundCloud and register an application on the SoundCloud for Developers page.

  2. Copy the Client ID and Client Secret of the application.

  3. Set the redirect URL of the application if you plan to use the authorization code flow.

  4. Keep the credentials safe and supply them to the connector through your Config.toml file. The connector requests tokens from https://secure.soundcloud.com/oauth/token by default.

Quickstart

To use the soundcloud connector in your Ballerina application, update the .bal file as follows:

  1. Import the soundcloud module.

    Copy
    import ballerinax/soundcloud;
  2. Add the application credentials to the Config.toml file.

    Copy
    clientId = "<CLIENT_ID>"
    clientSecret = "<CLIENT_SECRET>"
  3. Create a soundcloud:Client with the client credentials grant.

    Copy
    configurable string clientId = ?;
    configurable string clientSecret = ?;
    
    soundcloud:Client soundcloudClient = check new ({auth: {clientId, clientSecret}});
  4. Search for tracks.

    Copy
    public function main() returns error? {
        soundcloud:TracksResult _ = check soundcloudClient->searchTracks(q = "synthwave", linkedPartitioning = true);
    }

Examples

The SoundCloud connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:

  1. Genre playlist builder - Search tracks of a genre, collect them into a new playlist and read the playlist back.
  2. Track engagement workflow - Review a track's likes and comments, then like and comment on it.

Import

import ballerinax/soundcloud;Copy

Other versions

See more...

Metadata

Released date: 1 day ago

Version: 2.0.0

License: Apache-2.0


Security

Direct vulnerabilities: No known direct vulnerabilities

Indirect vulnerabilities: 

Checked on 2026-11-21 via OSV.dev


Compatibility

Platform: any

Ballerina version: 2201.12.0

GraalVM compatible: Yes


Pull count

Total: 45

Current verison: 1


Weekly downloads


Source repository


Keywords

Vendor/SoundCloud

Area/Marketing & Social Media

Type/Connector


Contributors