Search code examples
gmailgmail-apigoogle-api-php-client

How do i add Gmail API permission massively to my 300+ users?


i've been told that my organization needs a gmail inbox but with specific features (file control, folio tracking, etc) so as i understand reading the docs i can achieve it using the Gmail API (creating drafts, searching attachment documents, etc).

But now i wonder how can i set those permissions this app will need to my 300+ clients; i saw on forums i have to do so on each account.

How can i setup "generic" API permission for those accounts (all of them have been assigned to my organization, [email protected] for example)?

Thanks in advance!


Solution

  • Gsuite

    If this is a Gsuite account in which case you can use a service account with domain wide deligation and gain access to all of the accounts using the service account.

    Nomral Gmail users

    Each user will have to authenticate your application once and you will get a refresh token which you should save. You can then use the refresh token at any time to access the users account and gain access to change their permissions.