getSubscription

Retrieves an existing push subscription

Arguments

  • scope - Site scope string

Returns

A Subscription response that includes the following:

  • A URL that can be used to deliver push messages

  • A cryptographic key that can be used to encrypt messages that would then be decrypted using the `PushManager::decrypt` function

Errors

Returns an error in the following cases:

  • PushManager was unable to access its persisted storage

  • An error occurred generating or deserializing the cryptographic keys