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

# Device Registration

> Register and unregister a device for push notifications with the current SDK APIs.

Device registration connects the current signed-in user to the device token that the operating system gives your app. Use it after your app has completed the platform push-notification setup and after the SDK client is initialized for a signed-in user.

> [!WARNING]
>
> The TypeScript SDK does not expose a client-side device registration API. Use the native iOS, Android, or Flutter SDK APIs on device, and use server-side/webhook flows for web delivery.

## Platform Surface

| Platform | Register | Unregister | Token argument |
| - | - | - | - |
| iOS | `client.registerPushNotification(withDeviceToken:)` | `client.unregisterPushNotification()` | `token: String` |
| Android | `AmityCoreClient.registerPushNotification()` | `AmityCoreClient.unregisterPushNotification()` | None |
| Flutter | `AmityCoreClient.registerDeviceNotification(fcmToken)` | `AmityCoreClient.unregisterDeviceNotification()` | `fcmToken: String` |
| TypeScript | Not available | Not available | Not available |

## Parameters

| Name | Platform | Type | Required | Description |
| - | - | - | - | - |
| `token` | iOS | `String` | Yes | APNs device token passed to `registerPushNotification(withDeviceToken:)`. |
| `fcmToken` | Flutter | `String` | Yes | FCM token passed to `registerDeviceNotification`. |

Android registration does not accept a token argument in the current SDK API. The Android SDK registers the current signed-in user/device through `AmityCoreClient.registerPushNotification()`.

## Register A Device

Register the current signed-in user/device after platform push setup and SDK initialization are complete.

```swift iOS theme={null}
try await client.registerPushNotification(withDeviceToken: "<device-token>")
```

```kotlin Android theme={null}
AmityCoreClient.registerPushNotification()
    .doOnComplete {
        // Device registration completed.
    }
    .doOnError { error ->
        // Handle registration error.
    }
    .subscribe()
```

```dart Flutter theme={null}
await AmityCoreClient.registerDeviceNotification(fcmToken);
```

> [!NOTE]
>
> On Android, `registerPushNotification()` is a no-op for visitor and bot users. Register only after the app has a signed-in user session.

## Unregister A Device

Call unregister when the user signs out or when this app installation should stop receiving push notifications for the currently registered user.

```swift iOS theme={null}
try await client.unregisterPushNotification()
```

```kotlin Android theme={null}
AmityCoreClient.unregisterPushNotification()
    .doOnComplete {
        // Device unregistration completed.
    }
    .doOnError { error ->
        // Handle unregistration error.
    }
    .subscribe()
```

```dart Flutter theme={null}
await AmityCoreClient.unregisterDeviceNotification();
```

## Related Setup

Complete platform setup before calling the SDK registration API:

* [iOS Setup](/social-plus-sdk/core-concepts/realtime-communication/push-notifications/setup/ios-setup.md)
* [Android Setup](/social-plus-sdk/core-concepts/realtime-communication/push-notifications/setup/android-setup.md)
* [Flutter Setup](/social-plus-sdk/core-concepts/realtime-communication/push-notifications/setup/flutter-setup.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.