# Registering Push Devices

## Device Management

Device management allows you to register push tokens with Activity Feeds API, which is used to deliver push notifications to user devices.

### Device Registration Limits

<admonition type="info">

Each user has a limit of **25** unique devices. Once this limit is reached, the oldest device will be removed and replaced by the new device.

</admonition>

### Device Parameters

| Name                 | Type    | Description                                              | Default | Optional |
| -------------------- | ------- | -------------------------------------------------------- | ------- | -------- |
| `id`                 | string  | The device ID (push token provided by the push provider) | -       |          |
| `user_id`            | string  | The user ID for this device                              | -       |          |
| `push_provider`      | string  | The push provider (APN or Firebase)                      | -       |          |
| `disabled`           | boolean | Set if the device is disabled                            | false   | ✓        |
| `disabled_reason`    | string  | Explanation if the device is disabled                    | -       | ✓        |
| `push_provider_name` | string  | The push provider name for multi-bundle configurations   | -       |          |

### Register a Device

Register a device to associate it with a user and enable push notifications for activity updates.

<admonition type="info">

Register the user's device for push notifications once your user is successfully connected to Activity Feeds.

</admonition>

<admonition type="info">

Multi-bundle configurations require that you specify a `push_provider_name` when registering a device that corresponds to the name of the push configuration you've set up in the dashboard.

</admonition>

#### Multi-Bundle Device Registration

When using multi-bundle configurations, specify the provider name:

<Tabs>

```javascript label="JavaScript"
await client.createDevice({
  id: "<push token>",
  push_provider: "apn",
  push_provider_name: "production-ios",
});
```

```javascript label="React"
await client.createDevice({
  id: "<push token>",
  push_provider: "apn",
  push_provider_name: "production-ios",
});
```

```javascript label="React Native"
await client.createDevice({
  id: "<push token>",
  push_provider: "apn",
  push_provider_name: "production-ios",
});
```

```swift label="Swift"
// Configure the push provider info during SDK initialization
let notificationsConfig = PushNotificationsConfig(
    pushProviderInfo: PushProviderInfo(
        name: "production-ios",
        pushProvider: .apn
    )
)

let config = FeedsConfig(pushNotificationsConfig: notificationsConfig)
let feedsClient = FeedsClient(
    apiKey: apiKey,
    user: user,
    token: token,
    feedsConfig: config,
    tokenProvider: tokenProvider
)

// Then register the device
try await feedsClient.createDevice(id: pushToken)
```

```php label="php"
$response = $client->createDevice(
    new GeneratedModels\CreateDeviceRequest(
        id: "<push token>",
        pushProviderName: "production-ios",
        pushProvider: "apn",
        userID: "eric"
    )
);
```

```javascript label="Node"
await client.createDevice({
  id: "<push token>",
  push_provider: "apn",
  push_provider_name: "production-ios",
  user_id: "user_id",
});
```

</Tabs>

### List Devices

Get a list of all devices associated with a user.

<Tabs>

```javascript label="JavaScript"
const devices = await client.listDevices();
```

```javascript label="React"
const devices = await client.listDevices();
```

```javascript label="React Native"
const devices = await client.listDevices();
```

```swift label="Swift"
let devices = try await feedsClient.listDevices()
```

```php label="php"
$response = $client->listDevices("<user id>");
$devices = $response->getData()->devices;
```

```javascript label="Node"
const devices = await client.listDevices({ user_id: "<user_id>" });
```

</Tabs>

The device object contains the following properties:

<Tabs>

```javascript label="JavaScript"
{
  created_at: Date,
  id: string,
  push_provider: string,
  user_id: string,
  disabled?: boolean,
  disabled_reason?: string,
  push_provider_name?: string,
  voip?: boolean
}
```

```javascript label="React"
{
  created_at: Date,
  id: string,
  push_provider: string,
  user_id: string,
  disabled?: boolean,
  disabled_reason?: string,
  push_provider_name?: string,
  voip?: boolean
}
```

```javascript label="React Native"
{
  created_at: Date,
  id: string,
  push_provider: string,
  user_id: string,
  disabled?: boolean,
  disabled_reason?: string,
  push_provider_name?: string,
  voip?: boolean
}
```

```swift label="Swift"
public struct Device {
    public var createdAt: Date
    public var disabled: Bool?
    public var disabledReason: String?
    public var id: String
    public var pushProvider: String
    public var pushProviderName: String?
    public var userId: String
    public var voip: Bool?
}
```

```javascript label="Node"
{
  created_at: Date,
  id: string,
  push_provider: string,
  user_id: string,
  disabled?: boolean,
  disabled_reason?: string,
  push_provider_name?: string,
  voip?: boolean
}
```

</Tabs>

### Remove a Device

Remove a device to stop push notifications for that device.

<Tabs>

```javascript label="JavaScript"
await client.deleteDevice({
  id: "<device id>",
});
```

```javascript label="React"
await client.deleteDevice({
  id: "<device id>",
});
```

```javascript label="React Native"
await client.deleteDevice({
  id: "<device id>",
});
```

```swift label="Swift"
try await feedsClient.deleteDevice(deviceId: savedToken)
```

```php label="php"
$response = $client->deleteDevice("<device id>", "<user id>");
```

```javascript label="Node"
await client.deleteDevice({
  id: "<device id>",
});
```

</Tabs>

### Troubleshooting

If device registration isn't working:

1. **[Check your push configuration](/activity-feeds/docs/go-golang/push-providers-and-multi-bundle/)** in the Stream Dashboard
2. **Verify your device token** is valid and current
3. **Ensure proper permissions** are granted for notifications
4. **Check the push logs** in the Stream Dashboard for error messages
5. **Test with different devices** to isolate the issue

For more detailed troubleshooting, check the Activity Feeds logs and error responses from the API.


---

This page was last updated at 2026-05-22T16:31:48.895Z.

For the most recent version of this documentation, visit [https://getstream.io/activity-feeds/docs/go-golang/push-devices/](https://getstream.io/activity-feeds/docs/go-golang/push-devices/).