# Set up Amazon Music
URL: https://musicapi.com/docs/connect-users/configure-amazon-music.md

> What you need from the Amazon Developer Portal (a Security Profile), the allowed return URL, the scopes, and the business agreement that library access needs.

Product: MusicAPI Core and MusicAPI Managed Transfers. Section: Connect your users.

> **Managed integration:** A `transferring` sign-up gets copies of the integrations that MusicAPI runs. When your **Integrations** page already lists Amazon Music, users can sign in with no setup on your side.

> **Library access needs an Amazon agreement:** Your own Security Profile lets users sign in with Amazon. To read and write their music library, you also need an agreement with Amazon: contact your Amazon business development representative.

## What you need from Amazon

A Security Profile in the [Amazon Developer Portal](https://developer.amazon.com/dashboard):

1. Click **Create New Security Profile** and fill it in.
2. Save, then open **Web Settings**.
3. Add the return URL below to **Allowed Return URLs**.
4. Copy the **Client ID** and the **Client Secret** from **Web Settings**, and the **Security Profile ID** from the **General** tab.

| Amazon field                                 | MusicAPI field      |
| -------------------------------------------- | ------------------- |
| Security Profile ID (`amzn1.application.…`)  | Security Profile ID |
| Client ID (`amzn1.application-oa2-client.…`) | Client ID           |
| Client Secret                                | Client Secret       |

## Allowed return URL

```url
https://api.musicapi.com/callback/amazonMusic
```

## Scopes

```text
profile music::playlists
```

## Add it to MusicAPI

1. Open **Integrations** in the dashboard and pick Amazon Music.
2. Paste the three values, and save.
3. Turn **Is Enabled** on.
4. Press **Test Amazon** and sign in once.

## Quirks

- Amazon returns owned and followed playlists from two sources. MusicAPI joins them, so the list of playlists has no reliable order.
- Amazon gives no user country.
- At most 100 items per page (`limitParam`), at most 2,500 tracks per playlist.

## Direct sign-in link

```url
https://app.musicapi.com/{slug}/amazonMusic/auth?returnUrl={returnUrl}
```
