# Get the result of a sign-in
URL: https://musicapi.com/docs/reference/get-sign-in-result.md

`GET https://api.musicapi.com/public/integrations/auth/{authModelUUID}`

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 sign-in attempt of your account and the user it connected. `authData` is in the answer only for a Client Secret call or with a valid `oneTimeToken` from the callback.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `authModelUUID` | string | yes |  |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `oneTimeToken` | string | no | The one-time token from the callback. It must belong to your account and to this sign-in. |

## Response 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authModel` | AuthModel | yes |  |
| `authModel.uuid` | uuid | yes |  |
| `authModel.status` | string | yes | One of: initialised, success, error. |
| `authModel.error` | string \| null | yes |  |
| `authModel.errorType` | string \| null | yes | One of: accessDenied, notAllowedInYourCountry, missingScopes, deniedSubscriptionTier, null. |
| `integrationUser` | IntegrationUserWithAuthData \| null | 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. |

```json
{
  "authModel": {
    "uuid": "5b0c6f0e-2c8a-4d0e-9a51-7e3f1c2d9b44",
    "status": "initialised",
    "error": "string",
    "errorType": "accessDenied"
  },
  "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
  }
}
```

## Errors

- 403: The one-time token belongs to another account or another sign-in.
- 404: Your account has no sign-in attempt with this uuid.

## Example

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