Google Ads API - get customerId from e-mail address
I am trying to create a web application (backend is in PHP / Laravel), with this functionality
- user ads a valid gmail address
- system checks if the address is valid and if such a address is assigned to a Google Ads Account
- if true, system should "somehow" retrieve the customerId of the google ads account, or all of them if there are more than one accessible from the address
- system checks if the ads account is an MCC account step
- if so, system should list all of the customers the mcc account is "handling" ...
My question is - how do I do step 3?
The "input" data I have is the e-mail address, at this point I already know that it's valid, and the account has already given permission to my application to access google ads, I have everything properly configured, but
I have no clue HOW to do it. The official API documentation is not very helpful, just like the official PHP library which I'm using, it assumes that I KNOW the customerId (or the loginCustomerId in the case of MCC accounts).
Any clue how could I do it?