---
sidebar_position: 4
description: Get outgoing message log and other functions to work with GreenMax 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, GreenMax]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get outgoing message log
 Gets the latest outgoing messages of the instance



`Function GetOutgoingMessageLog(Val AccessParameters, Val Period = 1440) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | AccessParameters | --access | Structure Of KeyAndValue | &#x2714; | Access parameters. See FormAccessParameters |
  | Period | --span | Number | &#x2716; | 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/v3/docs/api/journals/LastOutgoingMessages/)
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    ApiUrl           = "https://3100.api.green-api.com/v3";
    MediaUrl         = "https://3100.api.green-api.com/v3";
    IdInstance       = "31003...";
    ApiTokenInstance = "17915d8e0b4b4975a183478da...";

    Period = 30;

    AccessParameters = OPI_GreenMax.FormAccessParameters(ApiUrl, MediaUrl, IdInstance, ApiTokenInstance);
    Result           = OPI_GreenMax.GetOutgoingMessageLog(AccessParameters, Period);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            # JSON data can also be passed as a path to a .json file
            
            oint greenmax GetOutgoingMessageLog \
             --access "{'apiUrl':'***','mediaUrl':'https://3100.api.green-api.com/v3','idInstance':'3100309139','apiTokenInstance':'***'}" \
             --span 30
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            :: JSON data can also be passed as a path to a .json file
            
            oint greenmax GetOutgoingMessageLog ^
             --access "{'apiUrl':'***','mediaUrl':'https://3100.api.green-api.com/v3','idInstance':'3100309139','apiTokenInstance':'***'}" ^
             --span 30
        ```
    </TabItem>
</Tabs>


```json title="Result"
[
 {
  "type": "outgoing",
  "idMessage": "1765401100602",
  "timestamp": 1765401103,
  "typeMessage": "videoMessage",
  "chatId": "-69594526449749",
  "downloadUrl": "https://mediaout-3100.storage.yandexcloud.net/3100309139/154b7b35-0e40-49c8-9590-e802a43b4f5c.mp4",
  "caption": "File description",
  "fileName": "vid.mp4",
  "jpegThumbnail": " ",
  "mimeType": "video/mp4",
  "isAnimated": false,
  "isForwarded": false,
  "forwardingScore": 0,
  "statusMessage": "delivered",
  "sendByApi": true,
  "editedMessageId": "",
  "deletedMessageId": "",
  "videoNote": false,
  "isEdited": false,
  "isDeleted": false
 },
 {
  "type": "outgoing",
  "idMessage": "1765401097224",
  "timestamp": 1765401097,
  "typeMessage": "imageMessage",
  "chatId": "-69594526449749",
  "downloadUrl": "https://mediaout-3100.storage.yandexcloud.net/3100309139/4595977d-c3a6-4d76-b293-db611a52b303.jpg",
  "caption": "File description",
  "fileName": "photo.jpg",
  "jpegThumbnail": " ",
  "mimeType": "image/jpeg",
  "isAnimated": false,
  "isForwarded": false,
  "forwardingScore": 0,
  "statusMessage": "delivered",
  "sendByApi": true,
  "editedMessageId": "",
  "deletedMessageId": "",
  "videoNote": false,
  "isEdited": false,
  "isDeleted": false
 },
 {
  "type": "outgoing",
  "idMessage": "1765401091198",
  "timestamp": 1765401093,
  "typeMessage": "extendedTextMessage",
  "chatId": "-69594526449749",
  "textMessage": "Message text",
  "extendedTextMessage": {
   "text": "Message text",
   "description": "",
   "title": "",
   "previewType": "None",
   "jpegThumbnail": "",
   "forwardingScore": 0,
   "isForwarded": false
  },
  "statusMessage": "delivered",
  "sendByApi": true,
  "deletedMessageId": "",
  "editedMessageId": "",
  "isEdited": false,
  "isDeleted": false
 }
]
```
