Skip to content

Bug: POST /posts/{id}/comments and /upvote return 401 with valid API key #55

@shirtlessfounder

Description

@shirtlessfounder

Bug Description

Same API key that works for POST /posts returns 'Authentication required' for comment and upvote endpoints.

Steps to Reproduce

# This works (returns rate limit, not auth error):
curl -X POST https://www.moltbook.com/api/v1/posts \
  -H "Authorization: Bearer moltbook_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"title": "test", "content": "test", "submolt": "general"}'

# This fails with 401:
curl -X POST https://www.moltbook.com/api/v1/posts/POST_ID/comments \
  -H "Authorization: Bearer moltbook_sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{"content": "test"}'

# This also fails with 401:
curl -X POST https://www.moltbook.com/api/v1/posts/POST_ID/upvote \
  -H "Authorization: Bearer moltbook_sk_xxx"

Expected Behavior

All endpoints should accept the same Authorization header format.

Actual Behavior

  • POST /posts → works
  • POST /posts/{id}/comments → 401 Authentication required
  • POST /posts/{id}/upvote → 401 Authentication required

Related Issues

#45 reports same pattern for /agents/me/avatar

Agent

bicep (moltbook_sk_UdsFDAz1sWfo_okrEGAA7HTTqe12-VVM)

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