Is there a way to prompt the domain administrator to enable API access during authorization?

StackOverflow https://stackoverflow.com/questions/16695486

  •  30-05-2022
  •  | 
  •  

Вопрос

Our web application will require API access to be enabled in the Google Apps control panel to take advantage of the Directory API (Admin SDK). Is there a way to prompt the domain administrator to enable it during their initial authorization with our application (if it is not enabled) or another alternative?

Это было полезно?

Решение

If the APIs are not enabled, the specific error you'll see will be:

Error 403: Domain cannot use apis. - domainCannotUseApis

when setting up your application, you should perform a simple Directory API request call, maybe something like users.get() for the admin user logged into your application. If you get the above error, you should prompt the admin to enable the APIs in the CPanel.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top