问题
I would like to have different pricing and licensing options for a Drive enabled app I am developing, based on the G-Suite edition that the user's account is provisioned with.
What API do I use to determine the Edition used for the currently logged in user?
Also, what is the recommended practice (or options) for who maintains my app's billing with business/enterprise? Can I determine if the user is a system admin and then show only them the billing/invoice sections of my app?
回答1:
Only resellers can get the Subscription information of their resold customer via API, using https://developers.google.com/admin-sdk/reseller/v1/reference/subscriptions/get.
For security the Admin SDK(and any other G Suite API but the reseller API) have access to billing information, the subscription type is considered part of the billing section that is way is not accessible
来源:https://stackoverflow.com/questions/50391968/determine-g-suite-edition