2025-02-23 12:59:52 +03:00
---
sidebar_position: 1
2025-05-05 11:15:20 +03:00
description: Form access parameters and other functions to work with Green API in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Green API]
2025-02-23 12:59:52 +03:00
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Form access parameters
Forms the structure of basic authorization data
`Function FormAccessParameters(Val ApiUrl, Val MediaUrl, Val IdInstance, Val ApiTokenInstance) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| ApiUrl | --api | String | ✔ | API host link |
| MediaUrl | --media | String | ✔ | Link to host API for sending files |
| IdInstance | --id | String | ✔ | Unique instance number |
| ApiTokenInstance | --token | String | ✔ | Instance access key |
Returns: Structure - Structure of access parameters
<br/>
:::tip
More details in the API documentation: [Get access parameters to instance](https://green-api.com/en/docs/before-start/#parameters)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
2025-06-29 14:35:33 +03:00
ApiUrl = "https://7105.api.greenapi.com";
MediaUrl = "https://7105.media.greenapi.com";
IdInstance = "71051...";
ApiTokenInstance = "425010d90e114aa6b78f0969e...";
2025-02-23 12:59:52 +03:00
Result = OPI_GreenAPI.FormAccessParameters(ApiUrl, MediaUrl, IdInstance, ApiTokenInstance);
```
2025-03-18 11:35:12 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint greenapi FormAccessParameters \
--api "***" \
--media "https://7105.media.greenapi.com" \
--id "7105187566" \
--token "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint greenapi FormAccessParameters ^
--api "***" ^
--media "https://7105.media.greenapi.com" ^
--id "7105187566" ^
--token "***"
```
</TabItem>
</Tabs>
2025-02-23 12:59:52 +03:00
2025-03-18 10:00:47 +03:00
```json title="Result"
{
"apiUrl": "https://7105.api.greenapi.com",
"mediaUrl": "https://7105.media.greenapi.com",
"idInstance": "7105187566",
"apiTokenInstance": "***"
}
```