Moonbase Documentation

Moonbase API

Authenticate users, fetch profile data, and download files.

Moonbase API is the backend surface for Moonbase apps and plugins. Use it to authenticate users, retrieve profile data, and fetch user files.

Authentication model

All requests include your public API key. After login, include the JWT in the Token header for user scoped endpoints.

Quick start

Copy your public API key from the console output on first startup.
Authenticate with POST /api/auth/user to receive a JWT.
Use the JWT and API key for profile and file requests.

Environment setup

.env.local
# Replace with your Moonbase API host.
NEXT_PUBLIC_API_URL=https://your-moonbase-host
# Printed once in the server console on first startup.
NEXT_PUBLIC_API_KEY=your_public_key_here

Jump in

On this page