2025-03-13 20:28:06 +03:00
---
sidebar_position: 1
2025-10-26 19:20:16 +03:00
description: Get message queue and other functions to work with GreenAPI 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, GreenAPI]
2025-03-13 20:28:06 +03:00
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get message queue
Gets the list of messages in the queue to be sent
`Function GetMessageQueue(Val AccessParameters) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| AccessParameters | --access | Structure Of KeyAndValue | ✔ | Access parameters. See FormAccessParameters |
Returns: Map Of KeyAndValue - serialized JSON response from Green API
<br/>
:::tip
Method at API documentation: [ShowMessagesQueue](https://green-api.com/docs/api/queues/ShowMessagesQueue/)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
2025-10-21 11:36:43 +03:00
ApiUrl = "https://7105.api.greenapi.com";
MediaUrl = "https://7105.media.greenapi.com";
IdInstance = "71051...";
ApiTokenInstance = "425010d90e114aa6b78f0969e...";
2025-03-13 20:28:06 +03:00
AccessParameters = OPI_GreenAPI.FormAccessParameters(ApiUrl, MediaUrl, IdInstance, ApiTokenInstance);
Result = OPI_GreenAPI.GetMessageQueue(AccessParameters);
```
2025-03-18 11:35:12 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
2025-10-07 19:27:04 +03:00
# JSON data can also be passed as a path to a .json file
2025-03-18 11:35:12 +03:00
oint greenapi GetMessageQueue \
2025-07-05 18:56:59 +03:00
--access "{'apiUrl':'***','mediaUrl':'https://7105.media.greenapi.com','idInstance':'7105187566','apiTokenInstance':'***'}"
2025-03-18 11:35:12 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
2025-10-07 19:27:04 +03:00
:: JSON data can also be passed as a path to a .json file
2025-03-18 11:35:12 +03:00
oint greenapi GetMessageQueue ^
2025-07-05 18:56:59 +03:00
--access "{'apiUrl':'***','mediaUrl':'https://7105.media.greenapi.com','idInstance':'7105187566','apiTokenInstance':'***'}"
2025-03-18 11:35:12 +03:00
```
</TabItem>
</Tabs>
2025-03-13 20:28:06 +03:00
2025-03-18 10:00:47 +03:00
```json title="Result"
2025-10-10 09:59:43 +03:00
[
{
2025-10-15 14:32:00 +03:00
"messageID": "BAE5B8457AE5FC88",
"type": "sendMessage",
2025-10-10 09:59:43 +03:00
"body": {
"chatId": "120363410406221140@g.us",
2025-10-15 14:32:00 +03:00
"message": "New message",
"linkPreview": true,
"typingTime": null,
"typePreview": "small"
2025-10-10 09:59:43 +03:00
}
},
{
2025-10-15 14:32:00 +03:00
"messageID": "BAE50DE3D325C617",
"type": "sendMessage",
2025-10-10 09:59:43 +03:00
"body": {
"chatId": "120363410406221140@g.us",
2025-10-15 14:32:00 +03:00
"message": "New message",
"quotedMessageId": "BAE5B8457AE5FC88",
"linkPreview": true,
"typingTime": null,
"typePreview": "small"
2025-10-10 09:59:43 +03:00
}
},
{
2025-10-15 14:32:00 +03:00
"messageID": "BAE5C8B93FC989C5",
"type": "sendFileByUrl",
2025-10-10 09:59:43 +03:00
"body": {
2025-10-15 14:32:00 +03:00
"fileName": "photo.jpg",
2025-10-10 09:59:43 +03:00
"chatId": "120363410406221140@g.us",
2025-10-15 14:32:00 +03:00
"caption": "File description",
"archive": false,
"urlFile": "https://do-mediaout-7105.fra1.digitaloceanspaces.com/7105187566/0ba995d0-5b11-4861-99b5-729204b596d2.jpg",
"typingTime": null,
"typingType": "composing"
}
},
{
"messageID": "BAE5F48C5BFFB882",
"type": "sendFileByUrl",
"body": {
"fileName": "vid.mp4",
"chatId": "120363410406221140@g.us",
"quotedMessageId": "BAE5C8B93FC989C5",
"caption": "File description",
"archive": false,
"urlFile": "https://do-mediaout-7105.fra1.digitaloceanspaces.com/7105187566/e74ea56d-b09a-4f61-a83d-836d8d6d10b3.mp4",
"typingTime": null,
"typingType": "composing"
}
},
{
"messageID": "BAE5D97C67FBD0D9",
"type": "sendFileByUrl",
"body": {
"chatId": "120363410406221140@g.us",
"urlFile": "https://hut.openintegrations.dev/test_data/picture.jpg",
"fileName": "photo.jpg",
"caption": "File description",
"typingTime": null,
"typingType": "composing"
}
},
{
"messageID": "BAE59BF0B798E59A",
"type": "sendFileByUrl",
"body": {
"chatId": "120363410406221140@g.us",
"urlFile": "https://hut.openintegrations.dev/test_data/video.mp4",
"fileName": "vid.mp4",
"caption": "File description",
"quotedMessageId": "BAE5D97C67FBD0D9",
"typingTime": null,
"typingType": "composing"
2025-10-10 09:59:43 +03:00
}
}
]
2025-03-18 10:00:47 +03:00
```