Push Providers & Multi Bundle

LAST EDIT Jul 07 2022

Push Provider

Copied!

A push provider is a configuration of a push API with one of four different types: APN, Firebase, Huawei and Xiaomi at the moment.

Multiple providers can be added to the same Stream application to support, for example:

  • Multi-tenancy: there can be different builds of the same application such as prod vs staging, regular vs admin, etc.

  • Multi-platform: there can be specific customizations for different target platforms such as starting React Native and adapting native Android/iOS SDKs along the way.

  • Different default preferences

Following endpoints, management of push providers only works if your app is upgraded to v2. Otherwise, the update app settings endpoint must be used for a single provider config per type (APN, Firebase, Huawei, Xiaomi).

Upsert a Push Provider

Copied!

In the same endpoint, a new config can be created or updated.

If the authentication information is updated, linked devices might be invalidated in the next push message sent retry.

List Push Providers

Copied!

Delete a Push Provider

Copied!

Push Providers & Devices

Copied!

By default, adding a device doesn't require a push provider linking due to backward compatibility where old configurations don't have a name, so their names are empty.

  • If the configuration name is not provided when adding a device, devices will be matched with configurations according to only their types.

  • If the configuration name is provided, but invalid, the request will fail with a bad request error.

When devices are added, they can be linked to a provider to inherit their configuration.

Updating non-multi bundle configs

Copied!

If you're not interested in multi-bundle support, you can leverageupdateAppSettings endpoint to add push configuration for a single APN, Firebase, Huawei or Xiaomi provider.

This works both under v1 and v2.