Google Workspaces API for viewing changes to user settings (activity logs) - In particular creating email delegates - google-api

I'm looking for where I can find the logs for google workspaces / gsuite regarding when a user changes their gmail settings.
In particular I would like to see log activity for when users are creating / updating / removing delegates from their gmail account. I've looked for days through API documentation and found nothing... Any help would be wonderful!
I'm also looking for the logs to see when a user is setting a new forwarding address. I've found the EmailForwardingOutOfDomain in the admin#reports#activity API already, but this is only for Email forwarding out of domain, as opposed to general activity of a user forwarding their emails.
Do any of the google API's provide this information? What is the activity type of such events?
Thanks!

Related

Can you change google calendar user settings via API?

Is it possible to change user settings in google calendar via API? What I found on their developer web documentation suggests that no, but maybe there is something I missed.
Thanks for any answers
The Google calendar api gives you access to a users google calendars. It does not give you access to change any settings for the user on the Google calendar web application thats two different things.
You can update the calendar itself changing calendar update some of the basic information about a calendar.
Unfortunately what you want cannot be achieved.
As you clearly noticed in the Calendar API documentation, the operations accepted for Calendar settings are: get, list and watch.
What you can do instead is to file a feature on request on Google Issue Tracker here.

How to force the gmail inbox to reload/refresh?

I have built an application that uses the import endpoint in the Gmail API Gmail.Users.Messages.import() to clone an email message but allow for subject changing.
It then deletes the original/old message using the remove endpoint Gmail.Users.Messages.remove()
I would like a way to refresh the Gmail inbox UI or even to just reload the web page from Google Apps Script - however, I'm not aware of how to do this - and a look around the internet hasn't proven especially helpful.
Unfortunately it's not possible to control the user's Gmail interface via an API (or add-on). The best your application could do is instruct the user to do it themselves.

Prevent conflicts when creating events in a resource calendar using Google Calendar V3

I'm trying to solve a problem of preventing double bookings using the Google Calendar Api (v3). I'm using Google resources in a GSuite environment. The bookings are made from a centralized platform on behalf of multiple users and are applied to multiple rooms (resources). The responsible application authenticates using a Service Account. The resource calendars are all configured to only accept invitations that do not conflict.
So far I found out that there are at least two ways to book a resource:
Create an event in the resource calendar
Create an event in a personal calendar en add the resource as attendee
I found out that in the first senario, events can be added to the resource calendar, even if they cause a conflict. There is no failure in the api response, the event is just added.
I tested the second scenario with my personal calendar and found out that the room needs to respond to the event invitation. Apparently that process may take several minutes before the room responds.
I'm building an api that should respond as fast as possible, but I want it to only create an event if it doesn't conflict. Of course I can use the free/busy information to reduce the chance of conclicts, but I would like to eliminate that chance entirely.
Does anyone know if Google provides functionality for this problem out of the box?
Thanks in advance.
Google does not do any validation on the api. You send what you want inserted and they insert it. Its up to you to ensure that it does not conflict with anything already there.
May i suggest that you check before you insert it and then do a double check in a few minutes to ensure there is no conflicts if there is then delete it again.

Slack API re-activate user after deactivating by users.admin.setInactive

When a user was deactivated (after using undocumented API method users.admin.setInactive), is there any possibilities to re-activate him using slackAPI? Unfortunatelly i didn't find any method for this...
The only way I've found is by using Slack SIM API. See PATCH /Users/{id} on:
https://api.slack.com/scim
Worth mentioning this is only available to Slack workspaces on the Plus plan and Slack Enterprise Grid.
Hope that helps!
After long searching it is possible to get users reactivated with the free api. You can not do it with a legacy key and api key. But you can with an session api key
see https://github.com/SvenHamers/slack-sessiontoken for an example how to automate it (Golang)
Api: users.admin.setRegular

Disable email notificaton when sharing a Google Calendar

I am using the Google Calendar API V3 to share Google calendars by managing the ACL Permissions. Many of my customers do not want an email notification when a new calendar is shared with them. Is there a way to disable that?
To explain bette what I am looking for: I also use the Google drive API v2 and that API addresses the issue by providing a sendNotificationEmails parameter that you can set to False when sharing a Google document (see this). I am looking for something similar.
Based from this documentation, you need to set sendNotifications to false so invitee didn't get the notification about the invitation even though invitee's calendar UI has New events setting to "true".
Check this example.
I don't believe this is currently possible. Sharing a calendar involves adding an ACL for a given user/group, and the notification email is generated upon adding the ACL. There does not appear to be any way to suppress the notification email. Even if you could, if you are sharing with a group, the individual users must click a link to add the calendar to their Calendar app.
I have put in a group of feature requests through the Calendar forum that would make this process easier. While it is aimed at the front end of the calendar application, I'm hoping they would add corresponding options to the APIs.

Resources