Web Developer APIs for groups

I was wondering, is there any API that I can use that can allow me to listen to when a person joins one of my groups or leaves? If so, can someone send it to me?

There’s a post abt this:

idk if this suites ur needs

Doesn’t seen to rely provide any information I require and the web API there seems to be outdated