google-apps

How to impersonate a GoogleCredential in a google apps domain?

旧巷老猫 提交于 2019-12-12 05:02:05
问题 I'm making an application wich allows the admin to manage the files of users in the google apps domain. Since the docList api is deprecated I used the Drive api. How I can create a Drive service as another user while logged in as admin? Some people suggested to use the OAuth consumer key. But I don't know how to implement this with oauth-2.0. 回答1: You might want to check out this post: Google Drive service account returns 403 usageLimits I used OAuth2 and a service account to accomplish

List emails of clients accounts on Google Apps

扶醉桌前 提交于 2019-12-12 03:14:42
问题 You will have to excuse my confusion here... Basically, we have clients with hosted accounts and I need to somehow get a list of emails per domain name. Say, test.com is a Google hosted account and that it uses Google's email service for admin@test.com , and several more, how can I find (programmaticaly) this complete list of emails? I've looked around for a while and it only brought more confusion. I think my question relates to this Google API document. While I'm usually armed with at least

how to find whole path of Google Apps Drive Documents using deprecated apis 3.0

僤鯓⒐⒋嵵緔 提交于 2019-12-12 02:55:18
问题 I am using Google Apps Drive APIs 3.0 . This API is deprecated but it is in maintenance phase. I want to find a path of Google Drive document. e.g. test/test1/test2/test3/testDoc.txt As of now, I am able to retrieve all the documents but without directory path. I want to show the whole path of a drive document. I believe, there is no API to retrieve the whole parent path or parent link. getFolders() method of DocumentListEntry is now deprecated is not able to show the folders path. I

Number of working days between two dates in Google Apps Script

廉价感情. 提交于 2019-12-12 02:28:44
问题 Could anyone please help with generating number of working days between two dates in Google Apps Script. Thank you. 回答1: From user KBA (https://stackoverflow.com/users/453331/kba) from response How do I calculate number of given weekday between range using Moment JS?: var firstDate = new Date("March 1, 2015"); var secondDate = new Date("March 25, 2015"); function getWeekdaysBetweenDates(firstDate, secondDate, dayOfWeek) { var MILISECONDS_IN_DAY = 86400000; function getNextDayOfWeek(date,

google admin SDK for non admin-user

筅森魡賤 提交于 2019-12-12 01:15:35
问题 I created google app in developer console. Enable Admin SDK Enable API access In "Manage OAuth Client access" i added "Authorized API client" with "https://www.googleapis.com/auth/admin.directory.user" scope. Further, i want to get users from my domain. JsonFactory JSON_FACTORY = JacksonFactory.getDefaultInstance(); HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); ArrayList<String> scopeList = new ArrayList<>(); scopeList.add(DirectoryScopes.ADMIN_DIRECTORY_USER

auto find and replace in Google Docs App Script

孤人 提交于 2019-12-12 01:04:42
问题 I'm trying to create a note-taking template/script for Google Docs (docs, not spreadsheets) that automatically converts abbreviations into full words/phrases (ex. typing 'mgmt' automatically turns into 'management'). I can't figure out how have this happen in real-time (vs. running the script after typing is done, which would basically be a quicker find and replace). Any tips? Or is this even possible? Thank you! 回答1: If you look under "Tools" and click "Preferences", that would be what you

Google Groups Migration C# API Not Working

大城市里の小女人 提交于 2019-12-12 00:22:58
问题 I'm trying to use the C# Google Groups Migration API and not having much luck. I have the following code: public static void Main(string[] args) { var body = @"Received: by 10.143.160.15 with HTTP; Mon, 16 Jul 2007 10:12:26 -0700 (PDT) Message-ID: NNNN@mail.samplegroup.com Date: Mon, 16 Jul 2007 10:12:26 -0700 From: ""xxx"" To: ""xxx"" Subject: SUBJECT MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline

How do I send mail to my google apps mail server from the webserver with the same name (using sendmail)?

南楼画角 提交于 2019-12-11 21:59:13
问题 Mail for my domain is handled by google apps service, all required DNS MX records entered correctly. Also I have webserver that handles HTTP requests for the domain. And I can't send mail from that server to my mail domain, sendmail ignores MX records and always trying to deliver all messages for my domain locally. Looks like it consider domain name as local if it resolves to local ip address. This is a cut from the logs: Feb 7 18:03:03 vds sendmail[4100]: n17I33c2004100: test@example.com...

How to create a dynamic chart in Google Apps Script UI

依然范特西╮ 提交于 2019-12-11 21:58:48
问题 I am looking to replicate the effect that you see in this Google I/O video at the 24m55s of this video (http://youtu.be/38H7WpsTD0M?t=24m55s). Does anyone know how this is done? The goal is to have an Apps Script webApp that shows a dynamic bar chart where its values change (and animate) upon changing of the values of the underlying spreadsheet. 回答1: Thank you for sharing the link to this video, it was really interresting and somehow I didn't notice it... That said, this shows a development

HOW TO modify a google spreadsheet from collaborators that aren't editors?

﹥>﹥吖頭↗ 提交于 2019-12-11 20:36:04
问题 I have a master and a client google spreadsheet Client is a copy of the master I only can access in master ss, my collaborator only in the client ss. My collaborator can edit the client ss; then clicking a menu (called "register") should write his modifications on the Master ss and send me automatically a mail. Ok, all is ok if my collaborator is a editor on the master; otherwise the register script doesn't go. How can I do? I have looked for this and I have seen that there is an AddEditor