📕
[ARCHIVED] Cape Agulhas App
  • Home
  • User guide
    • Installation
    • User accounts and service requests
    • Supported devices
    • Troubleshooting
    • How do I reset notification preferences?
    • Enable Notifications from Settings Page
  • Administrator guide
    • Managing content
    • Pages
      • Councillors
      • Services
    • Snippets
    • Notices and Notifications
    • Important Contacts
    • Icons
    • App Environments
    • Administrator accounts
  • API
    • Overview
    • Web hooks
    • Web push
    • Accounts
    • User authentication (JWT Token)
    • Service Requests
  • Development
  • Software Development
  • Architectural Decision Records
    • ADR01: Single page app vs server-side templating
    • ADR02: custom web push backend or which service
  • Collaborator Service Requests Integration
  • Deployment
  • Design System and Component Library
    • Webflow exports & changelog
    • Component library
    • Link Blocks
    • Form Elements
    • Grids
Powered by GitBook
On this page
  • Retrive VAPID public key
  • Create web push subscription object

Was this helpful?

  1. API

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()

PreviousWeb hooksNextAccounts

Last updated 4 years ago

Was this helpful?