---
sidebar_position: 1
title: PRINT_MD_TOKEN pragma
description: Retrieve your MotherDuck authentication token.
---
# PRINT_MD_TOKEN pragma

You can retrieve your MotherDuck authentication token using the `PRINT_MD_TOKEN` pragma.

In CLI or Python, to avoid having to re-authenticate every time, you can store your token as an environment variable; for example, by running `export motherduck_token='xxxx'` in the terminal. Be sure to replace 'xxxx' with your own token!  

# Syntax

```sql
PRAGMA PRINT_MD_TOKEN;
```



---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `POST https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

Payload:

```json
{
  "page_path": "/sql-reference/motherduck-sql-reference/print-md-token/",
  "page_title": "PRINT_MD_TOKEN pragma",
  "text": "<the user's feedback, max 2000 characters>",
  "source": "<optional identifier for your interface, for example 'claude.ai' or 'chatgpt'>"
}
```

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed payloads, and `429` when rate-limited.
