Plugin Screen Generation Flow

Creating image content to display on a user's device.

TRMNL generates a screen every X minutes, where X is the refresh frequency set by the user.

TRMNL generates screens by sending a POST request to the plugin_markup_url endpoint you specified during Plugin Creation. The request body will include the user_uuid (that particular user's plugin connection UUID). The request header contains an authorization key with the user's plugin connection access_tokenas the Bearer token. Here's an example of our server request:

curl -XPOST 'https://your-server.com/your-markup-url' \
-H 'Authorization: Bearer xxx' \
-d 'user_uuid=xx'

Your web server should respond with HTML inside a root node named markup, which is then processed by our image generation task to create an e-ink friendly image. This markup should include whatever values you want the user to see rendered on their screen.

Here's an example of a valid server response:

{
  markup: '<div class="view view--full">
    <div class="layout">
      <div class="columns">
        <div class="column">
          <div class="markdown gap--large">
            <span class="title">Daily Scripture</span>
            <div class="content-element content content--center">Hello</div>
            <span class="label label--underline mt-4">World</span>
          </div>
        </div>
      </div>
    </div>
  <div>'
}

Last updated