How to delete app storage data on app uninstalls?

So this cmd deletes the storage I can do that manually
mapps storage:remove-data -a 1234567890 -c 9876543210

I want to delete storage data when user uninstalls my app so I wanna call it when uninstalls webhook is fired, Is it possible?

I tried to get ShortLived token when a uninstall webhook is fired
the request.headers.get("authorization") is invalid it has no shortLived token so I can’t do any user action on my servers

is there is any other way?

I don’t know specifically for the storage part but in general: when an app is uninstalled the shortLivedToken is immediately invalidated. Therefore you can’t do any cleanup on behalf of the user. This is a bit of pain that has been addressed to monday about 3 years ago.

1 Like

3 years, Is there is any explaination on it?

Nope, just the comment that when an app is uninstalled the shortLivedToken and the scope is immediately invalidated.

Open a feature request here. It triggers a feature request in Monday’s internal systems that they will start tracking.

1 Like