# Get user's liked albums
URL: https://musicapi.com/docs/reference/list-albums.md

`GET https://api.musicapi.com/api/{integrationUserUUID}/albums`

Section: Read and write a user's library.
Product: MusicAPI Core.
Auth: Basic, DevToken, DocsSession (any one of them). Use Basic with your Client ID and Client Secret from your server only.

This endpoint fetches liked albums from Music Service.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `integrationUserUUID` | uuid | yes | The connected user: the `integrationUserUUID` from the sign-in callback. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `nextParam` | string | no | Parameter returned in the response responsible for pagination. |
| `limitParam` | number | no | Specifies the maximum number of results per request, adjusted based on the limitations of the respective music service. Ignored if the service doesn't support such a limit. |

## Response 200

ok

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `results` | Album[] | yes |  |
| `results[].id` | string | yes |  |
| `results[].name` | string | yes |  |
| `results[].totalItems` | number \| null | yes |  |
| `results[].imageUrl` | string \| null | yes |  |
| `results[].artists` | ArtistSimplified[] \| null | yes |  |
| `results[].artists.id` | string \| null | yes |  |
| `results[].artists.entryId` | string \| null | yes | Identifier associated with an artist within a user's library. Artist entry id can be obtained during fetching artists from user's library. |
| `results[].artists.name` | string | yes |  |
| `results[].artists.imageUrl` | string \| null | yes |  |
| `results[].artists.followers` | number \| null | yes |  |
| `nextParam` | string \| null | yes |  |
| `totalItems` | number \| null | yes |  |

```json
{
  "results": [
    {
      "id": "4Gfnly5CzMJQqkUFfoHaP3",
      "name": "Meteora",
      "totalItems": 13,
      "imageUrl": "https://www.example-image.com/978263478234",
      "artists": [
        null
      ]
    }
  ],
  "nextParam": "eyJvZmZzZXQiOjEwfQ==",
  "totalItems": 25
}
```

## Errors

- 404: Your account has no connected user with this uuid, or the item does not exist.
- 412: The user must sign in again (`IntegrationUserNotAuthenticated`).
- 429: Too many requests. Wait for the seconds in `Retry-After`.

## Example

```bash
curl https://api.musicapi.com/api/{integrationUserUUID}/albums \
  -u "$MUSICAPI_CLIENT_ID:$MUSICAPI_CLIENT_SECRET"
```
