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-15 13:14:53 +03:00
[
{
"messageID": "BAE5BCDC7E181539",
"type": "sendPoll",
"body": {
"chatId": "120363410406221140@g.us",
"message": "What's your favorite color?",
"options": [
{
"optionName": "Red"
},
{
"optionName": "Yellow"
},
{
"optionName": "Green"
}
],
"multipleAnswers": true,
"quotedMessageId": "BAE54F105F919929",
"typingTime": null
}
},
{
"messageID": "BAE500B4B10A1589",
"type": "sendLocation",
"body": {
"chatId": "120363410406221140@g.us",
"latitude": 53.908522,
"longitude": 27.574821,
"address": "Victory Square, Minsk",
"nameLocation": "Victory sq.",
"typingTime": null
}
},
{
"messageID": "BAE5B7DF9AA2B9EA",
"type": "sendLocation",
"body": {
"chatId": "120363410406221140@g.us",
"quotedMessageId": "BAE500B4B10A1589",
"latitude": 53.908522,
"longitude": 27.574821,
"typingTime": null
}
},
{
"messageID": "BAE51F190EDA19A9",
"type": "sendContact",
"body": {
"chatId": "120363410406221140@g.us",
"contact": {
"phoneContact": 79001234568,
"firstName": "Artem",
"middleName": "Evpatoriysky",
"lastName": "Petrovich",
"company": "Bicycle"
},
"typingTime": null
}
},
{
"messageID": "BAE5449C51CE5CB6",
"type": "sendContact",
"body": {
"chatId": "120363410406221140@g.us",
"contact": {
"phoneContact": 79001234568,
"company": "Bicycle"
},
"quotedMessageId": "BAE51F190EDA19A9",
"typingTime": null
}
},
{
"messagesIDs": [
"BAE518B0CEB15F0E"
],
"type": "ForwardMessages",
"body": {
"chatId": "120363410406221140@g.us",
"chatIdFrom": "120363410406221140@g.us",
"messages": [
"BAE55E709C547A29"
],
"typingTime": null
}
},
{
"messageID": "BAE5A4A04688F51A",
"type": "editMessage",
"body": {
"chatId": "120363410406221140@g.us",
"idMessage": "BAE55E709C547A29",
"message": "New message text",
"linkPreview": true
}
}
]
2025-03-18 10:00:47 +03:00
```