﻿---
sidebar_position: 3
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get event
 Gets an event by ID



`Function GetEvent(Val Token, Val Calendar, Val Event) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | Calendar | --calendar | String | &#x2714; | Calendar ID |
  | Event | --event | String | &#x2714; | Event ID |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Google

<br/>




```bsl title="1C:Enterprise/OneScript code example"
    Token    = "ya29.a0AeDClZCVfxXCE-JAcPJed8p82WT_K0Jtttw0mCwT02IVORX3qB2e7AM-8OQCJa8ImTUNCA5F--f_CULx1mArjs-Se30Fonbdtroe7NaOe...";
    Calendar = "498953a29d6cb0f89dc7d5a2a4f5783a10fcc566dce5c5eb9d7fa7c2c97f1aff@group.calendar.google.com";
    Event    = "26n7e2le1gbstg13eprap0inms";

    Result = OPI_GoogleCalendar.GetEvent(Token, Calendar, Event);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint gcalendar GetEvent \
             --token "***" \
             --calendar "ae928a108e4700f8b0c107d0ca39d55b1bc95d40e0998469f2529af5959032e0@group.calendar.google.com" \
             --event "0q4qrvep1ktglflet0m1v37ak0"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint gcalendar GetEvent ^
             --token "***" ^
             --calendar "ae928a108e4700f8b0c107d0ca39d55b1bc95d40e0998469f2529af5959032e0@group.calendar.google.com" ^
             --event "0q4qrvep1ktglflet0m1v37ak0"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "kind": "calendar#event",
 "etag": "\"3456908680754000\"",
 "id": "7rfbn0fb8nai4i7v4l435tgl1c",
 "status": "confirmed",
 "htmlLink": "https://www.google.com/calendar/event?eid=N3JmYm4wZmI4bmFpNGk3djRsNDM1dGdsMWMgNjA2MTNkNTNjNDY3MGFiZGNlZWMzZTc2OTNjYTQ3NWIwZTg4ZGMxNjc4ZGI3MjEwNTIxMzU2YjQ5NDBhNjE0OEBn",
 "created": "2024-10-09T06:12:19Z",
 "updated": "2024-10-09T06:12:20.377Z",
 "summary": "New event",
 "description": "New event description",
 "location": "InOffice",
 "creator": {
  "email": "bayselonarrend@gmail.com"
 },
 "organizer": {
  "email": "60613d53c4670abdceec3e7693ca475b0e88dc1678db7210521356b4940a6148@group.calendar.google.com",
  "displayName": "TestCalendar",
  "self": true
 },
 "start": {
  "dateTime": "2024-10-09T12:12:19+03:00",
  "timeZone": "Europe/Moscow"
 },
 "end": {
  "dateTime": "2024-10-09T13:12:19+03:00",
  "timeZone": "Europe/Moscow"
 },
 "iCalUID": "7rfbn0fb8nai4i7v4l435tgl1c@google.com",
 "sequence": 0,
 "reminders": {
  "useDefault": true
 },
 "attachments": [
  {
   "fileUrl": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg",
   "title": "Image1",
   "iconLink": ""
  },
  {
   "fileUrl": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture2.jpg",
   "title": "Image2",
   "iconLink": ""
  }
 ],
 "eventType": "default"
}
```
