# ai.newnal.illi.account.parent.signIn

> Sign a parent account in to ILLI from the device without the PDN's OAuth sign-in and consent screen: the device presents the parent's scoped deviceApp app password (which it keeps) and its attestation; the Service Agent Node opens the delegated session, joins the account to the service sphere on first use and returns the device-app session. Used at first connection and at every re-login.

- Kind: procedure
- Authority: parent.account.illi.newnal.ai
- Lexicon: 1
- Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.account.parent.signIn)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.account.parent.signIn/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.account.parent.signIn/analytics)

## Procedure (`ai.newnal.illi.account.parent.signIn`)

Type: procedure · POST

### Input (application/json)

- `appPassword` (string, required)
- `attestation` (string, required): Device attestation: production = an Android key-attestation statement whose certificate chain roots at Newnal's RKP CA and whose challenge is the nonce from account.getAttestationNonce, as a compact JWS with the x5c certificate chain; PoC = mock:device:<secret>.
- `deviceId` (string, required)
  - Constraints: maxLength: 64
- `did` (string · did, required)
- `slot` (integer)
  - Constraints: minimum: 1, maximum: 2

### Output (application/json)

- `deviceStatus` (string)
  - Constraints: knownValues: registered | awaitingLink | active | unlinked | retired
- `did` (string · did, required)
- `expiresAt` (string · datetime)
- `handle` (string · handle, required)
- `token` (string): The device-app session token for native clients; web clients receive it as the illi_session cookie.

### Errors

- `InvalidAppPassword`: No description in schema.
- `WrongScope`: No description in schema.
- `InvalidAttestation`: No description in schema.
- `DeviceRevoked`: No description in schema.
- `ParentLimitReached`: No description in schema.
- `ParentAlreadyLinked`: No description in schema.
- `RateLimitExceeded`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Sign a parent account in to ILLI from the device without the PDN's OAuth sign-in and consent screen: the device presents the parent's scoped deviceApp app password (which it keeps) and its attestation; the Service Agent Node opens the delegated session, joins the account to the service sphere on first use and returns the device-app session. Used at first connection and at every re-login.",
      "errors": [
        {
          "name": "InvalidAppPassword"
        },
        {
          "name": "WrongScope"
        },
        {
          "name": "InvalidAttestation"
        },
        {
          "name": "DeviceRevoked"
        },
        {
          "name": "ParentLimitReached"
        },
        {
          "name": "ParentAlreadyLinked"
        },
        {
          "name": "RateLimitExceeded"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "appPassword": {
              "type": "string"
            },
            "attestation": {
              "description": "Device attestation: production = an Android key-attestation statement whose certificate chain roots at Newnal's RKP CA and whose challenge is the nonce from account.getAttestationNonce, as a compact JWS with the x5c certificate chain; PoC = mock:device:<secret>.",
              "type": "string"
            },
            "deviceId": {
              "maxLength": 64,
              "type": "string"
            },
            "did": {
              "format": "did",
              "type": "string"
            },
            "slot": {
              "maximum": 2,
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "deviceId",
            "did",
            "appPassword",
            "attestation"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "deviceStatus": {
              "knownValues": [
                "registered",
                "awaitingLink",
                "active",
                "unlinked",
                "retired"
              ],
              "type": "string"
            },
            "did": {
              "format": "did",
              "type": "string"
            },
            "expiresAt": {
              "format": "datetime",
              "type": "string"
            },
            "handle": {
              "format": "handle",
              "type": "string"
            },
            "token": {
              "description": "The device-app session token for native clients; web clients receive it as the illi_session cookie.",
              "type": "string"
            }
          },
          "required": [
            "did",
            "handle"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.account.parent.signIn",
  "lexicon": 1
}
```
