--- sidebar_position: 4 description: Get outgoing message log 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 keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Green API] --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Get outgoing message log Gets the list of outgoing messages of the instance for the specified period `Function GetOutgoingMessageLog(Val AccessParameters, Val Period = 1440) Export` | Parameter | CLI option | Type | Required | Description | |-|-|-|-|-| | AccessParameters | --access | Structure Of KeyAndValue | ✔ | Access parameters. See FormAccessParameters | | Period | --period | Number | ✖ | Time in minutes for which messages need to be received | Returns: Map Of KeyAndValue - serialized JSON response from Green API
:::tip Method at API documentation: [LastOutgoingMessages](https://green-api.com/docs/api/journals/LastOutgoingMessages/) :::
```bsl title="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.GetOutgoingMessageLog(AccessParameters); ``` ```bash # JSON data can also be passed as a path to a .json file oint greenapi GetOutgoingMessageLog \ --access "{'apiUrl':'***','mediaUrl':'https://7105.media.greenapi.com','idInstance':'7105187566','apiTokenInstance':'***'}" ``` ```batch :: JSON data can also be passed as a path to a .json file oint greenapi GetOutgoingMessageLog ^ --access "{'apiUrl':'***','mediaUrl':'https://7105.media.greenapi.com','idInstance':'7105187566','apiTokenInstance':'***'}" ``` ```json title="Result" [ { "type": "outgoing", "idMessage": "BAE5DCC8C1092AA9", "timestamp": 1742274637, "typeMessage": "extendedTextMessage", "chatId": "120363410406221140@g.us", "textMessage": "New message", "extendedTextMessage": { "text": "New message", "description": "", "title": "", "previewType": "None", "jpegThumbnail": "", "forwardingScore": 1, "isForwarded": true }, "statusMessage": "", "sendByApi": true, "deletedMessageId": "", "editedMessageId": "", "isEdited": false, "isDeleted": false }, { "type": "outgoing", "idMessage": "BAE536960B4DEC58", "timestamp": 1742274636, "typeMessage": "contactMessage", "chatId": "120363410406221140@g.us", "contact": { "displayName": "Bicycle", "vcard": "BEGIN:VCARD\nVERSION:3.0\nN:;;;\nFN:Bicycle\nORG:Bicycle\nTEL;type=CELL;type=VOICE;waid=79001234568:+79001234568\nEND:VCARD", "forwardingScore": 0, "isForwarded": false }, "quotedMessage": { "stanzaId": "BAE506D813842127", "participant": "1234567890@c.us", "typeMessage": "contactMessage", "contact": { "displayName": "Artem Evpatoriysky Petrovich", "vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Petrovich;Artem;Evpatoriysky;\nFN:Artem Evpatoriysky Petrovich\nORG:Bicycle\nTEL;type=CELL;type=VOICE;waid=79001234568:+79001234568\nEND:VCARD", "forwardingScore": 0, "isForwarded": false }, "deletedMessageId": "", "editedMessageId": "", "isEdited": false, "isDeleted": false }, "statusMessage": "", "sendByApi": true, "deletedMessageId": "", "editedMessageId": "", "isEdited": false, "isDeleted": false }, { "type": "outgoing", "idMessage": "BAE506D813842127", "timestamp": 1742274634, "typeMessage": "contactMessage", "chatId": "120363410406221140@g.us", "contact": { "displayName": "Artem Evpatoriysky Petrovich", "vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Petrovich;Artem;Evpatoriysky;\nFN:Artem Evpatoriysky Petrovich\nORG:Bicycle\nTEL;type=CELL;type=VOICE;waid=79001234568:+79001234568\nEND:VCARD", "forwardingScore": 0, "isForwarded": false }, "statusMessage": "", "sendByApi": true, "deletedMessageId": "", "editedMessageId": "", "isEdited": false, "isDeleted": false }, { "type": "outgoing", "idMessage": "BAE57765EF184EBE", "timestamp": 1742274633, "typeMessage": "locationMessage", "chatId": "120363410406221140@g.us", "location": { "nameLocation": "", "address": "", "jpegThumbnail": "", "latitude": 53.908522, "longitude": 27.574821, "forwardingScore": 0, "isForwarded": false }, "quotedMessage": { "stanzaId": "BAE5B5DB91EC93BD", "participant": "1234567890@c.us", "typeMessage": "locationMessage", "location": { "nameLocation": "Victory Square, Minsk", "address": "Victory sq.", "jpegThumbnail": "", "latitude": 53.908522, "longitude": 27.574821, "forwardingScore": 0, "isForwarded": false }, "deletedMessageId": "", "editedMessageId": "", "isEdited": false, "isDeleted": false }, "statusMessage": "", "sendByApi": true, "deletedMessageId": "", "editedMessageId": "", "isEdited": false, "isDeleted": false }, { "type": "outgoing", "idMessage": "BAE5B5DB91EC93BD", "timestamp": 1742274632, "typeMessage": "locationMessage", "chatId": "120363410406221140@g.us", "location": { "nameLocation": "Victory Square, Minsk", "address": "Victory sq.", "jpegThumbnail": "", "latitude": 53.908522, "longitude": 27.574821, "forwardingScore": 0, "isForwarded": false }, "statusMessage": "", "sendByApi": true, "deletedMessageId": "", "editedMessageId": "", "isEdited": false, "isDeleted": false }, { "type": "outgoing", "idMessage": "BAE536F160DEF884", "timestamp": 1742274631, "typeMessage": "pollMessage", "chatId": "120363410406221140@g.us", "pollMessageData": { "name": "What's your favorite color?", "options": [ { "optionName": "Red" ... ```