Trying in vain to access the Directory API in the Google Admin SDK (Reference). Upgrading the "google-api-python-client" package doesn't resolve it, as the Downloads > Installation > Python link instructs.
I also don't see in the documentation where it lists the programmatic name of the API, so I'm assuming it's "directory", but have also tried "directory.admin" and "admin.directory." I get the following exception when I try to run my test code:
apiclient.errors.UnknownApiNameOrVersion: name: directory version: v1
Could someone please assist with what I may be overlooking? Unfortunately, the "Quickstart" that provides the shell to access the API seems to be broken (Reference). When I select Python > Command-Line > Configure Project, I get an error that states "Sorry, unable to configure a project right now."
Here's the pertinent piece of code I'm using in my custom Directory library class:
class Directory(object):
def __init__(self, httpConnection):
self.service = build('directory', 'v1', http=httpConnection)
Is this just a case of no client library being available yet for the API? If so, when might that be available?
The Admin SDK API is a RESTful API that can be used to programmatically create and manage admin-controlled resources owned by a Google Workspace account. Some use cases include: Creating and managing users and adding administrators.
The Directory API is used to create and manage resources attached to your Google Workspace domain, such as users, org charts, and groups.
Google Workspace™ — formerly known as G Suite™ — answers user management with an internal directory and administrator console. IT admins can use the directory and console to manage their users' access, or expand their administrative capabilities with the Google Cloud Identity platform.
There's an issue where this new API isn't appearing in the list of supported APIs, but it is indeed there, you can access it from:
service = build('admin', 'directory_v1')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With