# Get a connected user
URL: https://musicapi.com/docs/reference/get-integration-user.md

`GET https://api.musicapi.com/public/integrations/user/{integrationUserUUID}`

Section: Connect your users.
Product: MusicAPI Core and MusicAPI Managed Transfers.
Auth: Basic, Token, DevToken, DocsSession (any one of them). Use Basic with your Client ID and Client Secret from your server only.

Reads one connected user of your account. With Client Secret (Basic) authentication the answer also holds the raw service tokens (`authData`), refreshed when they expire within a minute. Every other credential gets the profile only.

## Path parameters

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

## Response 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `integrationUser` | IntegrationUserWithAuthData | yes |  |
| `integrationUser.uuid` | uuid | yes | The integrationUserUUID. Use it in every `/api/{integrationUserUUID}/...` call. |
| `integrationUser.integrationUserId` | string | yes | The user's id on the music service. |
| `integrationUser.name` | string \| null | yes |  |
| `integrationUser.email` | string \| null | yes |  |
| `integrationUser.imageUrl` | string \| null | yes |  |
| `integrationUser.country` | string \| null | yes | ISO 3166-1 alpha-2 country of the account, when the service tells us. |
| `integrationUser.authData` | object | no | The raw music-service credentials, without the refresh token. Only in answers to a Client Secret (Basic) or one-time-token call. |
| `integrationUser.authDataExpiresAt` | number \| null | no | When `authData` expires, in milliseconds since the epoch. |
| `integration` | object | yes |  |
| `integration.type` | string | yes | The music service of this user. |

```json
{
  "integrationUser": {
    "uuid": "3f0b8c1e-6a4d-4c7a-9a55-2f1e7d9b0c11",
    "integrationUserId": "mica.nowak",
    "name": "Mica Nowak",
    "email": "mica@example.com",
    "imageUrl": "https://images.example.com/mica.jpg",
    "country": "PL",
    "authData": {},
    "authDataExpiresAt": 0
  },
  "integration": {
    "type": "spotify"
  }
}
```

## Errors

- 401: The tokens could not be refreshed. Send the user to sign in again.
- 404: Your account has no connected user with this uuid.

## Example

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