﻿---
sidebar_position: 1
description: Create Connection  and other functions to work with RCON 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, RCON]
---

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

# Create Connection 
 Opens a new RCON connection



`Function CreateConnection(Val ConnectionParams) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | ConnectionParams | - | Structure Of KeyAndValue | &#x2714; | Connection parameters. See FormConnectionParameters |

  
  Returns:  Arbitrary - Connector object or structure with error information

<br/>


:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>



```bsl title="1C:Enterprise/OneScript code example"
    URL          = FunctionParameters["RCON_URL"];
    Password     = FunctionParameters["RCON_Password"];
    WriteTimeout = 20;
    ReadTimeout  = 20;

    ConnectionParams = OPI_RCON.FormConnectionParameters(URL, Password, ReadTimeout, WriteTimeout);
    Result           = OPI_RCON.CreateConnection(ConnectionParams);
```
 



```json title="Result"
NOT JSON: AddIn.OPI_RCON.Main
```
