跳到主要内容

subscribeDocumentsPushNotification

FirebaseDeviceWrapper subscribeDocumentsPushNotification(FirebaseRequestDto)

PUT /api/2.0/settings/push/docsubscribe

Set push subscription

Switches the push notifications of the Documents application on or off for one already registered device of the calling user: send that device's Firebase token together with isSubscribed true to let the messages through or false to stop them. The device has to be registered first with POST api/2.0/settings/push/docregisterdevice, and only the subscription state is written - the token is matched, never changed. Every signed-in member manages its own devices, whatever its role - owner, administrator, user or guest - and a token that belongs to another member or to another portal is not matched at all, so nothing of theirs can be switched. Repeating the call with the same pair leaves the registration as it is. What comes back is the updated registration, while an empty response means no registration of the caller carries that token and nothing was stored - register the device and call again. A device switched off keeps its token stored but is left out of the delivery, and the other devices of the same member are unaffected. Which kinds of notification the account receives at all is a separate setting, read with GET api/2.0/settings/notification/{type}.

Parameters​

NameInTypeDescriptionNotes
FirebaseRequestDtobodyFirebaseRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The device registration as it stands after the change, or an empty response when no registration of the calling user carries the token that was sentFirebaseDeviceWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

FirebaseDeviceWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json