How can I update/set the host controls' Quick Add settings to off while creating event using google calendar api. I want to achieve that when the host is not present in the meeting, no one else can join.
Image showing host controls:
My current api call in javascript is provided below which successfully creates the event.
gapi.client.calendar.events.insert({
"calendarId": "primary",
"conferenceDataVersion": 1,
"resource": {
"end": {
"date": eDate
},
"start": {
"date": sDate
},
"conferenceData": {
"createRequest": {
"conferenceSolutionKey": {
"type": "hangoutsMeet"
},
"requestId": "#(new Guid().ToString())"
}
},
"summary": "#(Model.Title+" Class Meeting")"
}
})
I have read the documentation as well but cannot find this setting. https://developers.google.com/calendar/api/v3/reference/events/insert
Related
I'm trying to sendConversation History API provided by Microsoft in BotFramework Documentation. It takes Transcript object (array of activities) as the input. But I've getting HTTP 400 Bad Request when using trying that.
I'm making a POST request on this and authenticating it using JWT Token generated by client credentials for the bot.
https://directline.botframework.com/v3/conversations/HBoZPkTiBYOAadigqEqFaJ-us/activities/history
This is the error I get.
{
"error": {
"code": "BadSyntax",
"message": "Invalid or missing activities"
}
}
This is the activity array payload that I'm using
[
{
"type": "message",
"id": "HBoZPkTiBYOAadigqEqFaJ-us|0000003",
"timestamp": "2022-09-05T08:10:00.3574378Z",
"localTimestamp": "2022-09-05T13:39:57.633+05:30",
"localTimezone": "Asia/Calcutta",
"serviceUrl": "https://directline.botframework.com/",
"channelId": "directline",
"from": {
"id": "dl_uID1",
"name": "userName"
},
"conversation": {
"id": "HBoZPkTiBYOAadigqEqFaJ-us"
},
"recipient": {
"id": "bot-name-dev#abcd",
"name": "bot-name-dev"
},
"textFormat": "plain",
"locale": "en-GB",
"text": "hi",
"channelData": {
"clientActivityID": "1662365337633rmq6e8mbm09",
"clientTimestamp": "2022-09-05T08:09:57.633Z"
}
}
]
I'm not able to figure out what's the correct format of activity object that it is expecting.
Create the bot and get it connected to the Direct Line. Get the secret keys of the site that need to connect.
Before calling SendConversationHistory if the message is delivered to the recipient, it will create the bad request error message as it is unable to get the conversation history as the message was already received. SendConversationHistory must be called before sending the message then the Conversation History will be tracked. The below screens will be helpful to create the DirectLine connection to the bot created. Then needed to add the trusted sites to DirectLine. Then proceed with the code sample mentioned below which takes the conversation history.
Click on Create a resource
Search for bot and click on create
Select Channels
Get the App Service Extension Keys and click on Default_site
Click on the toggle and enable the enhanced authentication options and add the website which we need to communicate.
In the code block of the current working application, to get the conversation history, use the following code block.
foreach (var a in activities)
{
incrementId++;
// Use your own ID format
a.Id = string.Concat("history|", incrementId.ToString().PadLeft(7, '0'));
a.ChannelData = null;
a.Conversation = new ConversationAccount(id: convId);
if (a.From.Name == message.Recipient.Name)
{
// Bot to recipient connection
a.Recipient = message.From;
a.From = message.Recipient;
}
else
{
// User to bot connection (here bot will be the recipient)
a.Recipient = message.Recipient;
a.From = message.From;
}
}
After connecting with Microsoft, I found this is the correct payload for this API.
{
"activities": [
{
"type": "message",
"id": "whatever-conversation-id-in|0000000",
"timestamp": "2022-11-20T20:14:26.242902Z",
"serviceUrl": "https://directline.botframework.com/",
"channelId": "directline",
"from": {
"id": "dl_test_id",
"name": ""
},
"conversation": {
"id": "whatever-conversation-id-in"
},
"recipient": {
"id": "ABC_bot",
"name": "ABC_bot"
},
"text": "Hello Bot"
}
]
}
I'm trying to create an event for a teams. Using the WEB interface, I can create and specify the channel. through the API, there's no channel field.
Also, When I'm specifying an organizer, it's being over writed to some other values.
What I need to do:
1-) create the event and keep the specified organizer
2-) invite all members of the channel (or specify the channel) when creating the event.
I'm following the official 1.0 API:
POST https://graph.microsoft.com/v1.0/groups/{my-id}/calendar/events
{
"subject": "TESTE - New Event - Sala virtual",
"body": {
"contentType": "HTML",
"content": "Does late morning work for you?"
},
"start": {
"dateTime": "2020-04-21T11:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2020-04-21T12:30:00",
"timeZone": "Pacific Standard Time"
},
"location":{
"displayName":"Online"
},
"attendees": [
{
"emailAddress": {
"address":"test#another.com",
"name": "Test"
},
"type": "required"
}
,
{
"emailAddress": {
"name": "Teste",
"address": "group#test.com"
},
"type": "required"
}
],
"onlineMeetingProvider":"teamsForBusiness",
"isOnlineMeeting": true,
"organizer":{
"emailAddress":{
"name":"Owner",
"address":"owner#test.com"
}
}
}
When creating an calendar event via MS Graph API the event looks different in the OWA and the Outlook Client.
In the Outlook client the event shows up ok in the overview, but when looking at the details it is shown in UTC instead of my timezone (Western Europe) and I cannot click/unclick the timezone button. If I open the same event in OWA it shows up in the correct timezone. Also if I send the event to another organisation it also shows up ok.
This leads me to believe it's something in our outlook client, but then I cannot see any difference in the graph API between events created from Outlook directly (looks ok) and the ones created via a rest call.
This is my payload
{
"subject": "tEST",
"organizer": {
"emailaddress": {
"address": "<email>"
}
},
"start": {
"dateTime": "2019-10-09T08:01:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2019-10-09T09:01:00.0000000",
"timeZone": "UTC"
},
"attendees": [
{
"emailAddress": {
"name": "Mattias Johansson",
"address": "<email>"
},
"type": "optional"
}
],
"reminderminutesbeforestart": 15
}
and this is a screenshot of the booking, the time is slightly different since it's another booking than the payload.
I've given the creator object with name and email id, but still it gets saved in the google calendar with my gmail ID only.
{
"end": {
"dateTime": "2017-07-20T20:30:00.392227",
"timeZone": "Asia/Kolkata"
},
"start": {
"dateTime": "2017-07-20T20:00:00.392227",
"timeZone": "Asia/Kolkata"
},
"summary": "Birthday Party",
"creator": {
"displayName": "Lara",
"email": "lara#gmail.com"
"self": true
}
}
What should I do to change the Creator or "Created By" under events in Google Calendar?
I don't think these properties (creator, creator.displayName, creator.email, creator.id, creator.self) are editable as they are marked as Read-only property in Events resources. You may only use them as is.
I wanted to check that while creating new Event using Api need to check that is there any event present or create on same date and time.I mean how to check conflicting calendar event during creating new event using Rest API?
Any help must appreciate.
Thanks in advance.
Instead of find the conflicts for the calendar event, we can use the Find meeting times feature (preview).
Here is an example for your reference:
POST https://outlook.office.com/api/beta/me/findmeetingtimes
Prefer: outlook.timezone="Pacific Standard Time"
Content-Type: application/json
{
"Attendees": [
{
"Type": "Required",
"EmailAddress": {
"Address": "fannyd#prosewareltd.onmicrosoft.com"
}
}
],
"TimeConstraint": {
"Timeslots": [
{
"Start": {
"Date": "2016-05-20",
"Time": "7:00:00",
"TimeZone": "Pacific Standard Time"
},
"End": {
"Date": "2016-05-20",
"Time": "17:00:00",
"TimeZone": "Pacific Standard Time"
}
}
]
},
"MeetingDuration": "PT1H"
}
Refer to here about more detail.