Fetch a track by ID.
OAuth access token
The track's numeric ID or URN
The track object with full metadata
When the track is not found or the API returns an error
import { getTrack } from 'soundcloud-api-ts';const track = await getTrack(token, 123456);console.log(track.title, track.duration); Copy
import { getTrack } from 'soundcloud-api-ts';const track = await getTrack(token, 123456);console.log(track.title, track.duration);
https://developers.soundcloud.com/docs/api/explorer/open-api#/tracks/get_tracks__track_id_
Fetch a track by ID.