Gamma API

Get the push configuration

GET
/api/account/push

Which protocol this server pushes over, and for webpush the VAPID key to subscribe with. protocol is null when push is off: subscribe to nothing.

Who may call it: Any signed-in user, for their own account. API keys: no.

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Response Body

OK.

application/json
  1. response
protocol*|

What devices register with; null when push is off.

publicKey*|

The VAPID public key, base64url, for applicationServerKey; null unless webpush.

Example Request
curl -X GET 'http://localhost:3000/api/account/push'
Example Response
{  "protocol": "webpush",  "publicKey": "string"}