Bulk delete messages

Hi,

In the past I made the mistake to switch on the “send welcome message on registration” feature on my pod, which sends a private message to every new user. I switched that off a while ago, but now I have several thousands of those messages in my podmin account.

While trying to delete them, I recognized that there is no bulk delete feature. From the messages page I need to click every single message, then (as there is also no keyboard shortcut like “Del”) I need to move my mouse to the upper right corner and hit the (barely visible) delete icon. Then (because the next message is not selected automatically), I need to move my mouse left again, select the next message, move right again to hit the delete icon, and so on…
Needless to say that this is not going to work for several 1000 messages. So my questions are:

(a) what does it cost to enable a bulk delete feature? Kindof the small checkbox in front of the message preview in the overview table, to mark the message, and a button to delete all the marked messages. Plus a checkbox-button in the table header to mark all messages? While being at that, more bulk actions are imaginable, like marking all the selected messages as “read”.

(b) Is there a workaround for my special situation, i.e. deleting the messages directly from the database (cleanly, so that no side artifacts are left in other places, and safely so that only the messages are deleted)?

Thanks in advance :slight_smile:

You can use the API for that.

Ah yes, excellent :slight_smile:!

But how do I get a Bearer token for a particular user? As far as I read here, you can use the authorization code or implicit flow to get a token. But these are UI flows, not usable on the command line with cURL.

The openid-configuration on my pod lists private_key_jwt under the token_endpoint_auth_methods_supported, so I guess I could eventually authenticate with a JWT bearer token? But therefore I must generate a key pair and get the public key into the authorization server somehow… a process which is apparently not (yet?) documented, along with the expected content of this authentication token. And I guess the password flow is not supported, as it is not listed?

The easiest way would be if I could generate a token in the UI and then use that at the API…

Nothing is preventing you from using those flows. Just use http://localhost as the redirect URI and copy whatever token is in the URL. OIDC is a widely used standard, you’ll find a lot of people doing this on the internet.

OIDC is a widely used standard, you’ll find a lot of people doing this on the internet.

Yes I know, I use it as well everyday (almost).

Hence my question, how to get an access token for an actual user. I dont want to register a client, do a lot of programming stuff or whatever, just to delete a bulk of messages in my user account. I just need a way to get a bearer token for my user, so that I can issue a curl -X DELETE -H „Authorization: Bearer …“ <whatever-url> on my command line.