---
sidebar_position: 4
description: Clear primary calendar and other functions to work with Google Calendar in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Google Calendar]
---

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

# Clear primary calendar
 Clears the event list of the primary calendar



`Function ClearMainCalendar(Val Token) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Google



```bsl title="1C:Enterprise/OneScript code example"
    Token = "ya29.a0Aa7pCA9fmPZk2eeWvC-VVPtSY4UzLqhBxacbBQw80RgQUw_wRm7_TGYppXdco1mWX6DVhkJklByQ4epXj_yOMf3j0BVPvNq966JHEVow5jOasNoGJdGn27Rq4...";

    Result = OPI_GoogleCalendar.ClearMainCalendar(Token);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint gcalendar ClearMainCalendar \
             --token "***"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint gcalendar ClearMainCalendar ^
             --token "***"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{}
```
