Andamio Logo
API

Quickstart

From zero to your first Andamio API call in 5 minutes, then the local app template when you're ready to build.

~5 minutes
|
steps
|Beginner

Get from zero to a working Andamio API call, then set up the local app template when you're ready to build a frontend.

Prerequisites

  • Cardano wallet on preprod with test ADASetup guide
  • For the app template (optional): Node.js 20+ and npm 10+

1. Mint your Access Token

Your Access Token is your on-chain identity for Andamio.

  1. Go to preprod.app.andamio.io
  2. Click EnterConnect Wallet
  3. Connect your wallet (preprod network)
  4. Enter an alias (permanent)
  5. Click Mint Access Token and sign
  6. Wait ~20 seconds for confirmation

2. Generate an API Key

  1. Go to preprod.app.andamio.io/api-setup
  2. Connect your wallet and sign in to the Gateway
  3. Select preprod
  4. Click Generate API Key and name it (e.g., "local-dev")

Save your key

Copy the key immediately — it won't be shown again.

3. Make your first API call

With just the API key you can read public data — no app template, no frontend, just curl. These read endpoints authenticate with the X-API-Key header alone.

List courses (this doubles as your connection test):

curl -X GET "https://preprod.api.andamio.io/api/v2/course/user/courses/list" \
  -H "X-API-Key: YOUR_API_KEY"

Responses wrap results in data with a meta block, and each item carries a source field marking whether it came from on-chain, off-chain, or both (see API Concepts):

{
  "data": [
    {
      "course_id": "dbd4f125...406bcac3",
      "course_address": "addr1...",
      "owner": "some-alias",
      "teachers": ["some-alias"],
      "source": "merged"
    }
  ],
  "meta": {}
}

Get the modules for a course:

curl -X GET "https://preprod.api.andamio.io/api/v2/course/user/modules/<course_id>" \
  -H "X-API-Key: YOUR_API_KEY"

What you can do with just an API key

EndpointDescription
GET /course/user/courses/listList courses with merged on-chain state
GET /course/user/modules/{course_id}Get a course's modules
GET /course/user/slts/{course_id}/{course_module_code}Get a module's SLTs
GET /project/user/projects/listList projects
GET /project/user/project/{project_id}Get project details
POST /project/user/tasks/listList a project's tasks

The full, always-current endpoint list lives in the API Reference. These are read endpoints. For user-specific actions — enrolling, submitting assignments, claiming credentials — you authenticate the user with a wallet signature. See Authentication for the full JWT flow.

Set up the app template

Ready to build a frontend? The app template wires up Web3 login and sponsored transactions for you.

Clone and Install

git clone https://github.com/Andamio-Platform/andamio-app-template.git
cd andamio-app-template
npm install

Configure Environment

cp .env.example .env

Edit .env:

NEXT_PUBLIC_ANDAMIO_GATEWAY_URL="https://preprod.api.andamio.io"
ANDAMIO_API_KEY="your-api-key-here"
NEXT_PUBLIC_CARDANO_NETWORK="preprod"
NEXT_PUBLIC_ACCESS_TOKEN_POLICY_ID="29aa6a65f5c890cfa428d59b15dec6293bf4ff0a94305c957508dc78"

Start the Dev Server

npm run dev

Open localhost:3000, click Enter, connect your wallet, and you should see your dashboard with your alias.

Setup complete.

Ready for Mainnet?

These docs use preprod (Cardano testnet) for safe development. When your app is ready for production:

  1. Generate a mainnet API key at app.andamio.io/api-setup
  2. Update .env with mainnet settings — see Environment Reference

Troubleshooting

"Access Token not found" — Check your wallet is set to preprod network.

"Invalid API key" — Verify there's no trailing whitespace and the key is quoted.

"Failed to fetch" — Test the gateway: curl https://preprod.api.andamio.io/health

Build errors — Regenerate types: npm run generate:types


Next Steps