As we transition from the deprecated Provisioning API over to the new Directory API, I see some gaping holes in the documentation in regards to how I as a reseller can manage my customers (Google Apps customers). Specifically, I'd like to know how I can use my Reseller OAUTH credentials to create a new user on behalf of one of my customers (as was possible in the Provisioning API) using the following endpoint:
https://developers.google.com/admin-sdk/directory/v1/reference/users/insert
In the above documentation, I don't see a reference to a customer's account. The only parameters that I believe may be useful are organizations
and externalIds
. There's little documentation as to what these do. I was thinking of testing the following scenarios:
$params = array(
'externalIds' => array(
array(
'type' => 'customer', // or 'account'?
'value' => $data['domain']
)
),
'organizations' => array(
array(
'name' => $data['domain'],
'domain' => $data['domain'],
'type' => 'domain_only',
'primary' => true
)
)
);
Likewise, when performing operations on an existing user such as retrieval of a customer, I don't see where I can specify which Google Apps account the specific user is tied to:
https://developers.google.com/admin-sdk/directory/v1/reference/users/get
In this case, there's not even parameters for organization or externalIds, so I have no idea how retrieval could be specific to a particular customer under my reseller account.
I need to be able to perform these actions as I was able to in the old Provisioning API on behalf of my customers using only my Reseller account OAUTH credentials.
Any help would be appreciated.