> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bota.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Client SDKs

> Official SDKs for the Bota API and mobile device integration

## Mobile SDKs

Mobile SDKs handle Bluetooth device communication, audio transfer, and upload to Bota's API.

### React Native

The official React Native SDK for integrating Bota devices into your mobile app.

```bash theme={null}
npm install @bota.dev/react-native-sdk
```

<CardGroup cols={2}>
  <Card title="npm Package" icon="npm" href="https://www.npmjs.com/package/@bota.dev/react-native-sdk">
    @bota.dev/react-native-sdk
  </Card>

  <Card title="GitHub" icon="github" href="https://github.com/bota-dev/react-native-sdk">
    Source code and documentation
  </Card>
</CardGroup>

**Features:**

* Device discovery and Bluetooth connection
* Automatic reconnection by serial number
* Device provisioning with tokens
* Recording transfer from device (batch sync)
* **Streaming sync** — upload audio via Bluetooth while device is still recording
* Background upload queue with retry
* Battery and storage monitoring
* WiFi network scanning and configuration (for WiFi-capable devices)

**Peer Dependencies:**

* `react` >= 18.0.0
* `react-native` >= 0.72.0
* `react-native-ble-plx` ^3.0.0
* `@react-native-async-storage/async-storage` ^1.21.0
* `react-native-wifi-reborn` >= 4.0.0 *(optional — for WiFi scanning)*

**Quick Start:**

```typescript theme={null}
import { BotaClient } from '@bota.dev/react-native-sdk';

// Initialize
BotaClient.configure({ logLevel: 'info' });

// Scan for devices
BotaClient.devices.startScan();
BotaClient.devices.on('deviceDiscovered', (device) => {
  console.log('Found:', device.name);
});

// Connect and provision
const connected = await BotaClient.devices.connect(device);
await BotaClient.devices.provision(connected, deviceToken, 'production');

// Reconnect to a previously paired device
const device = await BotaClient.devices.reconnect(serialNumber);

// Batch sync completed recordings
for await (const progress of BotaClient.recordings.syncRecording(connected, recording, uploadInfo)) {
  console.log('Progress:', progress.stage, progress.progress);
}

// Stream the current in-progress recording (live upload via BLE)
const session = BotaClient.recordings.startStreamingSync(connected, recordingUuid, uploadInfoProvider);
session.on('chunk', (p) => console.log(`Streaming: ${p.bytesReceived} bytes`));
session.on('completed', (result) => console.log('Done:', result.recordingId));
session.on('disconnected', () => console.log('BLE dropped, batch sync will recover'));
```

<Info>
  **Streaming sync** uploads audio from the device while it's still recording. If Bluetooth disconnects, the recording is safe on the device's SD card and batch sync picks it up later. See the [Streaming Upload guide](/guides/streaming-upload#ble-streaming-sync-via-mobile-app) for details.
</Info>

<Note>
  Mobile SDK reconnect identifies the physical device by serial number and cached BLE identity. It does not replace the Bota API device ID (`dev_*`). Store the `dev_*` returned when you register the device and keep it mapped to the serial number for later API calls. If needed, recover the ID with `GET /v1/devices?serial_number={SN}`.
</Note>

### Native iOS and Android

Native Swift/iOS and Kotlin/Android SDKs are not published today. Use the React Native SDK for mobile device integration.

## Server SDKs

Server SDKs for backend integration with the Bota API.

### Node.js / TypeScript (Coming Soon)

### Python (Coming Soon)

### Go (Coming Soon)

## Example Apps

Complete example applications demonstrating SDK integration.

<Card title="Examples Repository" icon="github" href="https://github.com/bota-dev/examples">
  Full working examples including React Native app with device pairing, recording sync, and backend integration.
</Card>

## Using the OpenAPI Spec

Until official server SDKs are published, you can generate clients from our OpenAPI specification:

```bash theme={null}
# Download the spec
curl -O https://docs.bota.dev/api-reference/openapi.json

# Generate using openapi-generator
openapi-generator generate -i openapi.json -g typescript-fetch -o ./bota-client
```

Tools like [openapi-generator](https://openapi-generator.tech/) or [Speakeasy](https://speakeasy.com/) work well with our spec.
