parcelvoy / platform

Parcelvoy: Open source multi-channel marketing automation platform. Send data-driven emails, sms, push notifications and more!
https://parcelvoy.com
MIT License
257 stars 47 forks source link

API endpoint to remove users #545

Open Un-dev opened 20 hours ago

Un-dev commented 20 hours ago

Would it be relevant/possible to have a client api endpoint to delete users ?

williamhrs commented 19 hours ago

I vouch for that as well.

As well as having more ways to filter users, instead of just e-mail

pushchris commented 19 hours ago

No, the client API utilizes a public facing API key and is not intended for any destructive actions, only for ingestion of data. If you need to manipulate data there are some endpoints available on the admin API (which unfortunately is not super well documented). For removing users, the details of this previous issue might be helpful: https://github.com/parcelvoy/platform/issues/315

Un-dev commented 18 hours ago

@pushchris thanks for the fast answer, unfortunately I'm a bit confused, in this discussion you're telling about DELETE /api/admin/projects/{PROJECT_ID}/users/{ID_TO_DELETE} and DELETE /api/admin/projects/{PROJECT_ID}/users?user_id={EXTERNAL_ID} but none of them are working for me

pushchris commented 18 hours ago

Are you using a secret API key with admin access? A client key does not work. That first endpoint is used in the UI itself when you delete a user so if thats working for you, then the endpoint is working and it's most likely your key