# OctoPrint Webhook

> Connect OctoPrint to 3D Print Log with a webhook so finished prints are logged automatically. Step-by-step configuration guide.

HTML version: https://www.3dprintlog.com/docs/octoprint-webhook. Last updated 2026-09-02.

## OctoPrint Integration via Webhook

---

3D Print Log can retrieve information from OctoPrint in order to update print status, print time, and filament usage. This is done using the [OctoPrint-Webhooks](https://plugins.octoprint.org/plugins/webhooks/) plugin by [Blane Townsend](https://plugins.octoprint.org/by_author/#blane-townsend).

> **Warning: Settings do not always save the first time**
>
> Users have reported the Webhook Plugin settings sometimes do not save correctly within OctoPrint. Refreshing the OctoPrint tab, re-entering the settings and saving again might be necessary. If you run into issues with the integration working, see the **Troubleshooting** steps below.

---

### Features

Using the OctoPrint Integration, when you start a print in OctoPrint, it should immediately save a new Print in 3D Print Log with a status of "Printing", which you can view [on your Print List](https://www.3dprintlog.com/prints). The new print contains estimated print times and filament usage from OctoPrint.

When a print finishes, the status inside of 3D Print Log will change to **Success** and the print will be updated with print times, and save a picture (if you have a webcam configured in OctoPrint). The Print Time and Filament Usage will be updated.

If a print is canceled in OctoPrint, 3D Print Log will change the status to "Failed" and save a picture (if you have a webcam configured in OctoPrint). The Print Time and Filament Usage will be updated.

---

### Limitations

There are a handful of limitations from using the OctoPrint Webhook plugin. If you are an OctoPrint plugin developer and would like to help create a custom 3D Print Log plugin, please [send us feedback — we are looking for help!](https://www.3dprintlog.com/feedback)

- OctoPrint does not keep track of actual filament usage, so we cannot save actual filament usage on completion/failures. 3D Print Log can only record the initial estimated usage.
- OctoPrint does not analyze print settings, so no print settings from the slicer will be automatically recorded in the Notes section.

---

### Setup

[Video: Setting up the OctoPrint webhook, start to finish](https://www.youtube.com/watch?v=E3kHsxSkBAw)

#### Step 1: Download the OctoPrint-Webhook plugin

- On your OctoPrint, navigate to Settings -> Plugin Manager, and click the **"Get More.."** button at the bottom.
- Search for "OctoPrint-Webhook", and install the plugin.

#### Step 2: Generate an API Key on 3D Print Log

OctoPrint will need an "API Key" to authenticate. This is how 3D Print Log knows what user your OctoPrint is for.

- Navigate to the [Personal Api Keys](https://www.3dprintlog.com/api-keys) page by clicking on your User Profile Picture at the top-right, and selecting "Personal Api Keys".
- Click **Create new API Key**.
- Enter a new description (such as "OctoPrint Webhook Key").
- Click **Submit** to generate a new key.
- Copy the new 32-character key for use in **Step 4**.

> **Warning: Copy the key before you leave the page**
>
> The API Key cannot be retrieved after you leave the page. Copy it to a secure location, otherwise you will have to generate a new key.

#### Step 3: Find your Printer ID number in 3D Print Log

OctoPrint needs to know what Printer to use in 3D Print Log. We'll need to find the printer's id number in 3D Print Log.

- Navigate to the [Printers](https://www.3dprintlog.com/printers) page.
- Find the printer you want to use, and **Click** on it to enter the Edit Details page.
- In your browser's URL bar, record the ID of the printer. It is the number after https://www.3dprintlog.com/printers/####
- Copy that ID number for use in **Step 4**.

#### Step 4: Add a new webhook in the OctoPrint Webhook plugin

- On your OctoPrint, navigate to Settings and find the Webhooks menu under Plugins.
- Click **New Hook**.
- Under URL, enter

  ```
  https://api.3dprintlog.com/api/Octoprint
  ```

- Scroll Down and expand the **Webhook Parameters** section.
  - Change **HTTP METHOD** to **POST**.
  - Change **CONTENT TYPE** to **x-www-form-urlencoded**.
  - Change **API SECRET** to the **Personal Api Key** you created in Step 2.
  - Change **DEVICE IDENTIFIER** to the **Printer ID Number** from Step 3.
- Scroll Down and expand the **Advanced** section.
  - Change **HEADERS** to

    ```
    {
        "Content-Type": "application/json",
        "X-Api-Key": "@apiSecret"
    }
    ```

  - Change **DATA** to

    ```
    {
        "deviceIdentifier":"@deviceIdentifier",
        "apiSecret":"@apiSecret",
        "topic":"@topic",
        "message":"@message",
        "extra":"@extra",
        "state": "@state",
        "job": "@job",
        "progress": "@progress",
        "currentZ": "@currentZ",
        "offsets": "@offsets",
        "meta": "@meta",
        "currentTime": "@currentTime",
        "snapshot": "@snapshot"
    }
    ```

- Click **Save** to save the settings.

#### Step 5: Send a test message

- On your OctoPrint, navigate to Settings and find the Webhooks menu under Plugins.
- With the 3D Print Log webhook selected, scroll to the **Testing** section.
- Select the TEST EVENT of **"Print Started"** and click the **"Send Test Webhook"** button.
- If everything is set up successfully, you should see a **"Response: Webhook Connection to 3D Print Log is Good!"** message appear, with the correct printer name.
- If an error message is returned, see Troubleshooting below.

#### Step 6: Happy printing!

The **OctoPrint Webhook** plugin should now be configured. Happy printing!

---

### Troubleshooting

These steps can help you resolve issues related to the OctoPrint Webhook Plugin.

#### Error Message: Invalid API Response: Invalid API Key

If you receive an **Invalid API Response: Invalid API Key** when sending a Test Webhook event, this indicates your API Key is not valid:

1. Refresh OctoPrint in your browser, and check that the OctoPrint Webhook plugin has the correct API key saved under **Webhook Parameters -> API SECRET**.
2. If the WebHook Plugin didn't save the API Secret, enter it and try to save again.
3. Create a new API Key in 3D Print Log. Follow Setup Step 2 and try a new API Key.

#### Error Message: Invalid API Response: Printer does not belong to current user. Please check DeviceIdentifier.

If you receive an **Invalid API Response: Printer does not belong to current user. Please check DeviceIdentifier.** when sending a Test Webhook event, this indicates your DEVICE IDENTIFIER is not correct.

1. Refresh OctoPrint in your browser, and check that the OctoPrint Webhook plugin has the correct Printer ID saved under **Webhook Parameters -> DEVICE IDENTIFIER**.
2. If the WebHook Plugin didn't save the DEVICE IDENTIFIER, enter it and try to save again.
3. The Printer ID should just be a number. Double check that the ID number matches your printer's ID from 3D Print Log. Repeat Setup Step 3 to get the correct Printer ID.

#### Error Message: Invalid API Response: No Printer Id found in webhook's DeviceIdentifier.

If you receive an **Invalid API Response: No Printer Id found in webhook's DeviceIdentifier.** when sending a Test Webhook event, this indicates your DEVICE IDENTIFIER is not correct.

1. Refresh OctoPrint in your browser, and check that the OctoPrint Webhook plugin has the correct Printer ID saved under **Webhook Parameters -> DEVICE IDENTIFIER**.
2. If the WebHook Plugin didn't save the DEVICE IDENTIFIER, enter it and try to save again.
3. The Printer ID should just be a number. Double check that the ID number matches your printer's ID from 3D Print Log. Repeat Setup Step 3 to get the correct Printer ID.

## Related pages

- [Prints](https://www.3dprintlog.com/docs/prints.md): Log every 3D print with photos, filament usage, print time, and settings. Learn how to create, edit, rate, and organize prints in 3D Print Log.

Index of every docs page in Markdown: https://www.3dprintlog.com/docs/llms.txt
