Web push

Retrive VAPID public key

GET https://muni-portal-backend.openup.org.za/api/webpush/public-key/

Get the value to use in the applicationServerKeyin PushManager.subscribe()

Headers

Name
Type
Description

HTTP_AUTHORIZATION

string

Bearer JWT.TOKEN

{"vapid_public_key": "abcdef"}

Create web push subscription object

POST https://muni-portal-backend.openup.org.za/api/webpush/subscription/

Create a new subscription object for the user identified by the provided token.

Headers

Name
Type
Description

HTTP_AUTHORIZATION

string

Bearer JWT.TOKEN

Request Body

Name
Type
Description

subscription_object

object

The result of PushSubscription.toJSON()

Last updated