[android-components](../../index.md) / [mozilla.components.feature.push](../index.md) / [PushConnection](index.md) / [subscribe](./subscribe.md)

# subscribe

`abstract suspend fun subscribe(scope: `[`PushScope`](../-push-scope.md)`, appServerKey: `[`AppServerKey`](../-app-server-key.md)`? = null): `[`AutoPushSubscription`](../-auto-push-subscription/index.md) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/push/src/main/java/mozilla/components/feature/push/Connection.kt#L34)

Creates a push subscription for the given scope.

**Return**
A push subscription.

