2025-03-13 20:28:06 +03:00
---
sidebar_position: 1
2025-05-05 11:15:20 +03:00
description: Get message queue 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-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-06-29 14:35:33 +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-07-05 18:56:59 +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-07-05 18:56:59 +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-09-12 20:23:31 +03:00
"messageID": "BAE5B9C2B49E8378",
"type": "sendMessage",
2025-03-18 10:00:47 +03:00
"body": {
"chatId": "120363410406221140@g.us",
2025-09-12 20:23:31 +03:00
"message": "New message",
"linkPreview": true,
"typingTime": null,
"typePreview": "small"
2025-03-18 10:00:47 +03:00
}
2025-09-12 20:23:31 +03:00
},
{
"messageID": "BAE53B77522E48A9",
"type": "sendMessage",
"body": {
"chatId": "120363410406221140@g.us",
"message": "New message",
"quotedMessageId": "BAE5B9C2B49E8378",
"linkPreview": true,
"typingTime": null,
"typePreview": "small"
}
},
{
"messageID": "BAE56F22A1089BAC",
"type": "sendFileByUrl",
"body": {
"fileName": "photo.jpg",
"chatId": "120363410406221140@g.us",
"caption": "File description",
"archive": false,
"urlFile": "https://do-mediaout-7105.fra1.digitaloceanspaces.com/7105187566/dcaaad1e-6185-4beb-81ab-0d2940760118.jpg",
"typingTime": null,
"typingType": "composing"
}
},
{
"messageID": "BAE599BBA6CBC9CA",
"type": "sendFileByUrl",
"body": {
"fileName": "vid.mp4",
"chatId": "120363410406221140@g.us",
"quotedMessageId": "BAE56F22A1089BAC",
"caption": "File description",
"archive": false,
"urlFile": "https://do-mediaout-7105.fra1.digitaloceanspaces.com/7105187566/d689e56b-f44d-49bd-81ee-3a6960bb7ce4.mp4",
"typingTime": null,
"typingType": "composing"
}
},
{
"messageID": "BAE540A3024371E9",
"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": "BAE55F4D006B2708",
"type": "sendFileByUrl",
"body": {
"chatId": "120363410406221140@g.us",
"urlFile": "https://hut.openintegrations.dev/test_data/video.mp4",
"fileName": "vid.mp4",
"caption": "File description",
"quotedMessageId": "BAE540A3024371E9",
"typingTime": null,
"typingType": "composing"
}
},
{
"messageID": "BAE53F069534A286",
"type": "sendPoll",
"body": {
"chatId": "120363410406221140@g.us",
"message": "What's your favorite color?",
"options": [
{
"optionName": "Red"
},
{
"optionName": "Yellow"
},
{
"optionName": "Green"
}
],
"multipleAnswers": false,
"typingTime": null
}
},
{
"messageID": "BAE5DAA37B4A4562",
"type": "sendPoll",
"body": {
"chatId": "120363410406221140@g.us",
"message": "What's your favorite color?",
"options": [
{
"optionName": "Red"
},
{
"optionName": "Yellow"
},
{
"optionName": "Green"
}
],
"multipleAnswers": true,
"quotedMessageId": "BAE53F069534A286",
"typingTime": null
}
},
{
"messageID": "BAE5D30C26CC6814",
"type": "sendLocation",
"body": {
"chatId": "120363410406221140@g.us",
"latitude": 53.908522,
"longitude": 27.574821,
"address": "Victory Square, Minsk",
"nameLocation": "Victory sq.",
"typingTime": null
}
},
{
"messageID": "BAE5EB9F3449F7D0",
"type": "sendLocation",
"body": {
"chatId": "120363410406221140@g.us",
"quotedMessageId": "BAE5D30C26CC6814",
"latitude": 53.908522,
"longitude": 27.574821,
"typingTime": null
}
},
{
"messageID": "BAE55927F0298DA5",
"type": "sendContact",
"body": {
"chatId": "120363410406221140@g.us",
"contact": {
"phoneContact": 79001234568,
"firstName": "Artem",
...
2025-03-18 10:00:47 +03:00
```