> ## Documentation Index
> Fetch the complete documentation index at: https://help.cryptolens.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Python 3: Message

> Read, create and remove update messages.

Python 3 package `licensing 0.54`. [Reviewed source revision](https://github.com/Cryptolens/cryptolens-python/tree/8f38b5a37580f2aba1c9374f581cdc85e251950f).

```python theme={null}
from licensing.methods import Message
```

<a id="licensing.methods.Message.get_messages" />

## get\_messages

Retrieve messages, optionally filtered by channel and creation time.

```python theme={null}
Message.get_messages(token, channel='', time=0)
```

### Parameters

| Parameter | Default | Meaning |
| - | - | - |
| `token` | Required | Your access token. It needs the permission required by the linked Web API method. |
| `channel` | `''` | The message channel. |
| `time` | `0` | Return messages created strictly after this Unix timestamp. `0` leaves the time filter unset. |

### Result

Returns `(messages, '')`, where `messages` is a list of dictionaries.

Returns `(None, message)` for API rejection or a handled request failure. Malformed response data can raise an exception.

### Checks

The API checks the access token's permissions. This method does not verify a signed license response.

[Web API reference](/api-reference/generated/GetMessages).

<a id="licensing.methods.Message.create_message" />

## create\_message

Create an update message.

```python theme={null}
Message.create_message(token, content='', channel='', time=0)
```

### Parameters

| Parameter | Default | Meaning |
| - | - | - |
| `token` | Required | Your access token. It needs the permission required by the linked Web API method. |
| `content` | `''` | The text of the message. |
| `channel` | `''` | The message channel. |
| `time` | `0` | The message's Unix timestamp. With `0`, the API uses the time the message is sent. |

### Result

Returns `(message_id, '')`.

Returns `(None, message)` for API rejection or a handled request failure. Malformed response data can raise an exception.

### Checks

The API checks the access token's permissions. This method does not verify a signed license response.

[Web API reference](/api-reference/generated/CreateMessage).

<a id="licensing.methods.Message.remove_message" />

## remove\_message

Remove a message by its ID.

```python theme={null}
Message.remove_message(token, messageId)
```

### Parameters

| Parameter | Default | Meaning |
| - | - | - |
| `token` | Required | Your access token. It needs the permission required by the linked Web API method. |
| `messageId` | Required | The numeric message ID. |

### Result

Returns `(True, '')` on success.

Returns `(None, message)` for API rejection or a handled request failure. Malformed response data can raise an exception.

### Checks

The API checks the access token's permissions. This method does not verify a signed license response.

[Web API reference](/api-reference/generated/RemoveMessage).

[Python SDK Reference](/libraries/python-api)
