How to unregister device from push proxy and/or NC server with command-line

Nextcloud (server) version : 20.0.0 (docker instance)
Nextcloud Notification (server) : 2.8.0
Server behind NAT

Device : Xiaomi Redmi Note 9S, Android 10
Nextcloud (android) : 3.13.1, from Google Play Store

How to right way to unregister device from push proxy https://push-notifications.nextcloud.com ?
Device registered on NC server (I found record in oc_notifications_pushtokens table), but how I find required parameters for DELETE request?:

  • deviceIdentifier
  • deviceIdentifierSignature
  • userPublicKey

For example, a wrote this script

#!/bin/bash

deviceIdentifier=""
signature=""
userPublicKey=""

JSON="{
  \"deviceIdentifier\": \"$deviceIdentifier\",
  \"deviceIdentifierSignature\": \"$signature\",
  \"userPublicKey\": \"$userPublicKey\"
}"

curl -v -H "Content-Type: application/json" -X DELETE -d "$JSON" https://push-notifications.nextcloud.com/devices

From readme for push notifications the required parameters are found in the server response when the device is first registered.

UPD
And how to correct unregister device from NC server from command-line (curl or occ)?

Hi @Tinctura_Ginseng!
Did you find a solution for unregistering devices from the push proxy?
Thank you in advance for your help!
Best, Nico

1 Like