Render message

Render a message to HTML.


Usage examples

#!/usr/bin/env python3

import wyzepal

# Pass the path to your wyzepalrc file here.
client = wyzepal.Client(config_file="~/wyzepalrc")

# Render a message
request = {
    "content": "**foo**",
result = client.render_message(request)

More examples and documentation can be found here.

const wyzepalInit = require("wyzepal-js");

// Pass the path to your wyzepalrc file here.
const config = { wyzepalrc: "wyzepalrc" };

(async () => {
    const client = await wyzepalInit(config);

    // Render a message
    const params = {
        content: "**foo**",

    console.log(await client.messages.render(params));

curl -sSX POST \
    --data-urlencode content=Hello


content string required

Example: Hello

The content of the message. Maximum message size of 10000 bytes.


Return values

  • rendered: string The rendered HTML.

Example response

A typical successful JSON response may look like:

    "msg": "",
    "rendered": "<p><strong>foo</strong></p>",
    "result": "success"