Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtain Domains list #3346

Closed
saveriopetrucci opened this issue Aug 11, 2023 · 1 comment
Closed

Obtain Domains list #3346

saveriopetrucci opened this issue Aug 11, 2023 · 1 comment

Comments

@saveriopetrucci
Copy link

Hello,
I try to obtain a list of domains of workspace, but i receive error:

require "vendor/autoload.php"; $sa_json = file_get_contents("config.json"); $client = new Google_Client(); $client->setAuthConfig($jsonKey); $client->setScopes(array( 'https://www.googleapis.com/auth/admin.directory.domain', )); $dir = new Google_Service_Directory($client); $results = $dir->listDomains();

but I receive:

Fatal error: Uncaught Error: Call to undefined method Google\Service\Directory::listDomains() in /var/www/html/googletools/test.php:3

can you help me?

@vishwarajanand
Copy link

Rather than doing $dir->listDomains() you can do $dir->domains;, see ref:

Screenshot 2023-10-27 at 14 20 08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants