google-directory-api

Google Admin SDK error Resource Not Found: domain when trying to list existing users

别来无恙 提交于 2019-12-06 13:02:25
I am trying to write a simple script to get a list of my Google Apps users using Google's python API. So far it looks like this (based on a Google example): !/usr/bin/python import httplib2 from apiclient import errors from apiclient.discovery import build from oauth2client.client import OAuth2WebServerFlow from oauth2client.client import SignedJwtAssertionCredentials client_email = 'service_account_email@developer.gserviceaccount.com' with open("Python GAPS-98dfb88b4c9f.p12") as f: private_key = f.read() OAUTH_SCOPE = 'https://www.googleapis.com/auth/admin.directory.user' credentials =

Google Static Maps API with encoded polyline

会有一股神秘感。 提交于 2019-12-06 02:51:05
问题 I have made a request to google directions API and recived the following JSON directions: (file to large to copy here) https://gist.githubusercontent.com/crooksey/9930819/raw/947e4d17a93ca94b78216d92fbd94b281966dede/directions_api At the bottom, I get the encoded polyline data: ecduHxqrE|RfS{SlW_w@zDc{@ig@cVlK}z@j}Aog@z{AuGbdDibAfkGaBpcG}~@vrGy_AhhCoi@feB{bBxu@kxAsSus@|eAcLdyBci@dcByi@ly@`GrgC_S~d@e\\wBugA_uBwuAusAoaCidAs~Dq{DiaAu`CuwAweAevBi@}dDwgCsrAwfBuqFkmBwzEu~DenAa|Bi_BcuDmrAghF_{B_hGa{

Non-admin read-only access to Google Admin SDK

家住魔仙堡 提交于 2019-12-05 18:23:18
In a post on the Google Developers blog from September 23, 2014, it says: Read access to all domain users Historically, only admins have been able to access the data in the Admin SDK. Beginning today, any user (not just admins) will now be able to call the Directory API to read the profile of any user on the domain (of course, we will respect ACLing settings and profile sharing settings). However, despite checking every Google Apps Admin setting I can find, my calls calls to the Directory API fail for non-admin users. Condensed code: params = { client_id: XXXXXX, scope: 'https://www.googleapis

How to use GTMAppAuth in Swift

别来无恙 提交于 2019-12-05 17:34:52
I do not know how to code in Objective-C and have to get an app working with the G Suite SDK so that I can get information about members of the groups. The problem is that in September Google changed how auth requests work, so this tutorial no longer works. I know I need to switch over to using GTMAppAuth , but it's all Objective-C. I am currently working on YouTube Data API and trying to implement functions in Swift. The following is what I did: Install GTMAppAuth using Cocoapods. Add bridging header and import necessary headers. The above 2 steps didn't result in a successful compilation,

members.list() in Google Admin SDK Directory API (Java)

非 Y 不嫁゛ 提交于 2019-12-05 15:12:16
I have a piece of code(in Java) to list all members of a group on a personal Google Apps Domain. This uses the google Directory API. Here is the snippet: public static void listMembers(String groupKey,Directory service) throws IOException { Members res = service.members().list(groupKey).execute(); List<Member> members = res.getMembers(); int count = 0; if (members == null || members.size() == 0) { System.out.println(); System.out.println("No members found."); } else { System.out.println(); System.out.println("Members of "+groupKey); for (Member member : members) { count++; System.out.println

Why is type of these User properties object: Addresses, Emails, Organizations, etc?

醉酒当歌 提交于 2019-12-04 21:33:01
I am referring to the Google.Apis.Admin.Directory.directory_v1.Data.User type. The property type of Addresses , for example, in beta versions (i.e. 1.7 and older) was public virtual System.Collections.Generic.IList<UserAddress> Addresses { get; set; } In later versions (currently 1.9.1 ), they are all of type object. public virtual object Addresses { get; set; } What are the reasons behind the change and usage scenarios? I trawled the release notes , the web, google group , SO, etc. and found no explanation on this. A change to the backend had the unintended consequence of changing the

Creating a group with Admin SDK Directory API in Google Apps Script - Error 403

纵饮孤独 提交于 2019-12-04 19:04:21
I've read through all of the relevant pages in the Admin ADK Directory API documentation and several questions on stackoverflow, and I'm still stuck. I'm trying to use Google Apps Script (container-bound within the Script Editor of a Google Sheet) to create a group. I am the super admin of my Google Apps domain, and the scripts will be running as me. Here's what I did in the Script Editor so far: Went to Resources - Advanced Google Services... - turned on the Admin Directory API Clicked the link below that for the Google Developers Console and enabled the Admin SDK Took working code that I

How can I retrieve the CustomerId from a using Google API calls from a NonAdmin user?

左心房为你撑大大i 提交于 2019-12-04 05:40:18
问题 I'm trying to retrieve the 'customerId' value for a Non-Admin user on a Google Apps Enterprise. As a non-admin there are a lot of APIs I won't have access to. Is there any way for me to retrieve the 'customerId' for my account? 回答1: The customerId is identical for all users in the Google Apps instance (including users in other secondary domains). If you're working with a single Google Apps instance, the customerId is static and thus once discovering it from an admin account, you can hard code

How can I retrieve the CustomerId from a using Google API calls from a NonAdmin user?

[亡魂溺海] 提交于 2019-12-02 11:28:57
I'm trying to retrieve the 'customerId' value for a Non-Admin user on a Google Apps Enterprise. As a non-admin there are a lot of APIs I won't have access to. Is there any way for me to retrieve the 'customerId' for my account? The customerId is identical for all users in the Google Apps instance (including users in other secondary domains). If you're working with a single Google Apps instance, the customerId is static and thus once discovering it from an admin account, you can hard code it. In order to retrieve the customerId via the users.get() API call, the authenticated user needs to at

How to update a user's externalId using Java

核能气质少年 提交于 2019-12-02 10:06:36
I'm trying to update a user with an externalId based on the Google Admin SDK documentation. UserExternalId externalId = new UserExternalId(); externalId.setType( "account" ); externalId.setValue( "test" ); User user = new User(); user.setExternalIds( externalId ); try { User update = directory.users().update( "USERKEY", user ).execute().setExternalIds( externalId ); LOGGER.info("Response from google: " + update.toPrettyString()); User full = directory.users().get( "USERKEY" ).setProjection( "full" ).execute(); LOGGER.info( "Response from new get user: " + full.toPrettyString() ); } catch