# camera.pair

Source: https://docs.lightair.app/developers/remote-api/camera.pair

> Makes a pairing link for a Phone camera layer, for Lightair Live to scan.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Objects and sources. Script plugins need the `project.write` permission.

The person still allows the phone in Lightair before it's used.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `source` | `string` | yes | The Phone camera layer's source id or name. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `source` | `string` | no | The layer's source id. |
| `link` | `string` | no | The pairing link. |
| `expires_at` | `number` | no | When the link stops working, in Unix seconds. |

## Errors

Invalid params (-32602) without `source`. Not found (-32004) when it isn't a Phone camera layer. A state error (-32005) while the phones' port is starting: ask again in a moment.

## From an AI agent

The MCP server's `phone_camera (action: pair)` reaches this method.

## Related

- [camera.status](https://docs.lightair.app/developers/remote-api/camera.status.md)
- [camera.control](https://docs.lightair.app/developers/remote-api/camera.control.md)
- [object.add](https://docs.lightair.app/developers/remote-api/object.add.md)
