Skip to main content

Get message queue

Gets the list of messages in the queue to be sent

Function GetMessageQueue(Val AccessParameters) Export

ParameterCLI optionTypeRequiredDescription
AccessParameters--accessStructure Of KeyAndValueAccess parameters. See FormAccessParameters

Returns: Map Of KeyAndValue - serialized JSON response from Green API


tip

Method at API documentation: ShowMessagesQueue


1C:Enterprise/OneScript code example
    ApiUrl           = "https://7105.api.greenapi.com";
MediaUrl = "https://7105.media.greenapi.com";
IdInstance = "71051...";
ApiTokenInstance = "425010d90e114aa6b78f0969e...";

AccessParameters = OPI_GreenAPI.FormAccessParameters(ApiUrl, MediaUrl, IdInstance, ApiTokenInstance);
Result = OPI_GreenAPI.GetMessageQueue(AccessParameters);
    # JSON data can also be passed as a path to a .json file

oint greenapi GetMessageQueue \
--access "{'apiUrl':'***','mediaUrl':'https://7105.media.greenapi.com','idInstance':'7105187566','apiTokenInstance':'***'}"
Result
[
{
"messageID": "BAE5B8457AE5FC88",
"type": "sendMessage",
"body": {
"chatId": "120363410406221140@g.us",
"message": "New message",
"linkPreview": true,
"typingTime": null,
"typePreview": "small"
}
},
{
"messageID": "BAE50DE3D325C617",
"type": "sendMessage",
"body": {
"chatId": "120363410406221140@g.us",
"message": "New message",
"quotedMessageId": "BAE5B8457AE5FC88",
"linkPreview": true,
"typingTime": null,
"typePreview": "small"
}
},
{
"messageID": "BAE5C8B93FC989C5",
"type": "sendFileByUrl",
"body": {
"fileName": "photo.jpg",
"chatId": "120363410406221140@g.us",
"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"
}
}
]