The author mentions building this solution multiple times, but doesn't link to any resources as far as I can tell, so here's the one I've used in the past [1].
In one mode, it proxies all your app's API calls and tells you exactly what permissions you need.
In one mode, it proxies all your app's API calls and tells you exactly what permissions you need.
[1] https://github.com/iann0036/iamlive