Namespaces
Push
Learn how to register the signed-in person's devices for push and set up the project's push provider.
- Stable unknown
- Release candidate not available
- Development since 0.2.0-dev.33+c6e0f70
ovok.push has two halves. devices registers the devices a signed-in person receives push on, each their own. provider holds the provider the project's push goes through (fcm, apns, expo or relay) and is for project admins.
Register a device
device = ovok.push.devices.register({"token": token, "platform": "android", "appId": "com.example.care"})
ovok.push.devices.unregister(device["id"])- Registering the same token again answers the same device. The token is never returned.
listreturns the signed-in person's devices underdevices.unregisterremoves a device, which then gets no more push.
Set up the provider
relay = ovok.push.provider.create({"provider": "relay", "url": "https://push.example.com/ovok"})
signing_secret = relay["secret"]createchecks the credentials with the provider first. A relay'swhsec_signing secret is answered this once.retrievereads the provider and its settings, never a secret.updatechanges the provider set up, andremoveremoves it.
See also
Last updated on