google-admin-sdk

Do I need to use my reseller domain when writing apps that use the Reseller API?

喜你入骨 提交于 2019-12-01 11:37:16
问题 I am a Google Apps reseller and would like to use Google APIs like the Google Apps Reseller API to automate my reseller activities. When I signed up to be a Google Apps reseller I was given a new Google Apps domain (reseller.mydomain.com). If I want to automate reseller tasks using the Reseller API, do I have to logon to the Google Developer console as myuser@reseller.mydomain.com or can I continue to use myuser@mydomain.com? I'm hoping I can use my normal user since that is where all my

404 Resource Not Found: domain with Google Directory API

一曲冷凌霜 提交于 2019-12-01 11:06:01
I followed the quick start and am attempting to create a user using the google-api-ruby-client. I've set up access in the google api console. And I can get this to work using the API explorer. But when I try using the ruby client, I'm getting a resource not found: domain error. Here's the code: def self.create_user # Initialize the client. client = Google::APIClient.new( :application_name => 'MYAPP', :application_version => '0.0.1' ) # Authorization # Load our credentials for the service account key = Google::APIClient::KeyUtils.load_from_pkcs12(KEY_FILE, KEY_SECRET) client.authorization =

Accessing G Suite Admin SDK using service account

假如想象 提交于 2019-12-01 08:19:34
I am trying to use a service account to access Directory API ( https://developers.google.com/admin-sdk/directory/v1/reference/users/list ). The simplest task is to list users in the organization. That works well with my user account, tested with the OAuth 2.0 Playgorund. But I need to use service account. I am following documentation for two-legged OAuth ( https://developers.google.com/identity/protocols/OAuth2ServiceAccount ) and implementing REST client in Powershell API Access enabled in Google Admin Console The service acount is created and P12 credentials downloaded. The account is

Google Admin SDK 403 Not Authorized to Access this Resource/API

你。 提交于 2019-12-01 05:31:18
问题 I use the following code in a java web application to try to get all users of a group: GoogleCredential credential = GoogleCredential.fromStream(Util.class.getResourceAsStream("[credential_file].json")).createScoped(SCOPES); Directory directory = new Directory.Builder(httpTransport, JSON_FACTORY, credential).build(); Directory.Members dirMem = directory.members(); Members members = dirMem.list("[group_email]").execute(); This results in an exception 403 (Not authorized to access this resource

Google Gmail API - Delegation settings

给你一囗甜甜゛ 提交于 2019-12-01 01:08:56
Apologies if this is covered elsewhere and I have missed it. Google's Email Settings API is deprecated and set to be turned off on July 7, 2017 . With this date looming, I have started investigating migrating our local delegated account management web application to the new API. As you might expect, this applications allows users to list, add and delete delegate access to a Gmail account. It currently uses the OAuth 2.0 scope of. https://apps-apis.google.com/a/feeds/emailsettings/2.0/{domain}/{username}/delegation However, the delegate section of the migration guide , written in July 2016,

Google php client library loadServiceAccountJson broken - fix enclosed

我的未来我决定 提交于 2019-11-29 13:01:15
The new function in the php library loadServiceAccountJson doesn't allow setting sub in the Google_Auth_AssertionCredentials creator, so always gives authorization fails. How do we get the library updated? The following instructions will allow a working query, in my case to the Admin SDK Directory API: First, update the php library function loadServiceAccountJson in src/Google/Client.php to this: public function loadServiceAccountJson($jsonLocation, $scopes) { $data = json_decode(file_get_contents($jsonLocation)); if (isset($data->type) && $data->type == 'service_account') { // Service Account

How can an Admin access the Google Drive contents of all the users in a particular domain?

你。 提交于 2019-11-29 12:08:18
I am developing a tool to automate the transfer of ownership of Google Drive documents from one user to another using Admin SDK which is run by the admin. I used the Data transfer API for the ownership transfer. I wanted to validate the transfer by checking the size/number of the google drive documents before and after the transfer for which the admin account must be able to access the Google Drive contents of all the users in the domain. Is there a way to do that? Or is there a better way to validate the data transfer? I tried using the Drive API service for validating purposes by setting the

Received error “Not Authorized to access this resource/api” when trying to use Google Directory API and Service Account Authentication

雨燕双飞 提交于 2019-11-29 10:43:39
I'm really struggling with trying to use Service Account authentication to use the Google Directory API (Admin SDK). Using client based three legged OAuth this works (tested here - https://developers.google.com/admin-sdk/directory/v1/reference/members/insert ) but there's a problem with the permission delegation to the service account I am using. Under the Google Apps administration, I enabled using APIs and added the service account to the list of allowed OAuth clients as instructed. Here is the code: import httplib2 import sys from apiclient.discovery import build from oauth2client.client

Create gmail account for a domain using Google Admin SDK Directory API in Java

試著忘記壹切 提交于 2019-11-29 08:43:04
How to create a gmail account for a domain in Java using the Google Admin SDK Directory API? Is there an example somewhere? The Google documentation is terrible regarding this issue. Marcos This is a basic example showing how to create a user using the Directory API of the Admin SDK ( https://developers.google.com/admin-sdk/directory/v1/reference/users/insert ). I’ve not included the OAuth 2 initialization code as this is fairly standard and similar to other Google APIs. You need to initialize a Directory instance using your OAuth credential and this will depend on the type of application you

Google Admin SDK Unable to Create User - Exception 403 Forbidden

浪子不回头ぞ 提交于 2019-11-28 14:09:33
I am trying to create a user using C# and the google-admin-directory_v1-rev24-csharp-1.7.0-beta client libraries however I keep geting an exception: Google.GoogleApiException was unhandled HResult=-2146233088 Message=Google.Apis.Requests.RequestError Not Authorized to access this resource/api [403] Errors [ Message[Not Authorized to access this resource/api] Location[ - ] Reason[forbidden] Domain[global] ] Source=Google.Apis ServiceName=admin StackTrace: at Google.Apis.Requests.ClientServiceRequest`1.Execute() in c:\code\google.com\google-api-dotnet-client\default\Tools\Google.Apis.Release\bin