Skip to content

Documented /api/check eligibility command returns HTML instead of JSON #1

Description

@silentgeckoaudit3801

The currently active AIBTC bounty for Early Eagles documents this eligibility command:

GET https://early-eagles.vercel.app/api/check?stxAddress=YOUR_STX_ADDRESS

That route is not defined in vercel.json, so the final catch-all serves mint-page/index.html with HTTP 200 and Content-Type: text/html. An agent following the instructions cannot parse an eligibility result.

Reproduction

curl -i "https://early-eagles.vercel.app/api/check?stxAddress=SPQ6E2KZ6S3XA9KZJ8F4SSA01FFHMZEKGJA3GCF6"

Actual: HTTP 200, Content-Type: text/html; charset=utf-8, body begins <!DOCTYPE html>.

The working endpoint is:

curl -i "https://early-eagles.vercel.app/api/eligibility?address=SPQ6E2KZ6S3XA9KZJ8F4SSA01FFHMZEKGJA3GCF6"

It returns application/json with eligible, reason, agent, and alreadyMinted.

Expected

The published agent instructions should use /api/eligibility?address=..., or the application should provide a backward-compatible /api/check alias that accepts stxAddress.

Small fix options

  1. Update the active bounty/instructions to the canonical /api/eligibility?address=... command.
  2. For compatibility, add /api/check before the catch-all in vercel.json, dispatch it to handleEligibility, and accept stxAddress as an alias for address.

No credentials or eligible Genesis account are required to reproduce the routing/content-type failure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions