soundcloud-api-ts - v1.9.0
    Preparing search index...

    Function resolveUrl

    • Resolve a SoundCloud URL to its API resource URL.

      SoundCloud returns a 302 redirect to the API resource; this function returns the redirect target URL.

      Parameters

      Returns Promise<string>

      The resolved API resource URL

      When the URL cannot be resolved

      import { resolveUrl } from 'soundcloud-api-ts';

      const apiUrl = await resolveUrl(token, 'https://soundcloud.com/deadmau5/strobe');
      console.log(apiUrl); // "https://api.soundcloud.com/tracks/..."