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.
OAuth access token
A SoundCloud URL (e.g. "https://soundcloud.com/artist/track-name")
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/..." Copy
import { resolveUrl } from 'soundcloud-api-ts';const apiUrl = await resolveUrl(token, 'https://soundcloud.com/deadmau5/strobe');console.log(apiUrl); // "https://api.soundcloud.com/tracks/..."
https://developers.soundcloud.com/docs/api/explorer/open-api#/resolve/get_resolve
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.