While looking for the solution to this, I came across this thread and someone in the comments mentions that the API allows for granting access but not revoking.
I can't find any evidence of this anywhere, could anyone please guide me to the right resource or tell me that it in fact is not possible?