Skip to content

Resolve

resolve(params, requestInit?)

Resolve a provided Audius app URL to the API resource it represents.

Example:

const { data: track } = await audiusSdk.resolve<Track>({
  url: 'https://audius.co/camouflybeats/hypermantra-86216',
})
 
console.log(track)

Params

Create an object with the following fields and pass it as the first argument, as shown in the example above.

NameTypeDescriptionRequired?
urlstringThe url of the resource to resolveRequired

You can pass an optional RequestInit object as the second argument to customize the underlying fetch request (e.g. set custom headers, abort signal, etc.).

Returns

Returns a Promise containing an object with a data field. data is an object representing the resolved resource as described below.

{
  data: Track | Playlist | Album
}