Skip to content

X OAuth Live Import: API endpoints not implemented #50

@NickPlaysCrypto

Description

@NickPlaysCrypto

Bug

The Import page's Live Import tab always shows "X OAuth not configured" and "Could not connect to the server" — even after successfully saving X OAuth credentials in Settings.

Root Cause

The API endpoints that the Import page calls do not exist. The LiveImportTab component fetches from /api/import/x-oauth/* routes that have never been implemented.

What happens:

  1. User saves X OAuth Client ID + Secret in Settings → ✅ Saved to DB correctly
  2. GET /api/settings returns hasXOAuth: true → ✅ Credentials confirmed
  3. Import page calls GET /api/import/x-oauth/status → ❌ 404 — route doesn't exist
  4. The generic .catch() handler fires → displays "Could not connect to the server"

Expected endpoints (none exist):

  • GET /api/import/x-oauth/status — Check OAuth config & connection
  • GET /api/import/x-oauth/authorize — Start OAuth flow
  • GET /api/import/x-oauth/callback — Handle OAuth redirect from X
  • POST /api/import/x-oauth/disconnect — Remove token
  • POST /api/import/x-oauth/fetch — Fetch bookmarks via X API

Evidence

The /app/api/import/ directory only contains bookmarklet/, live/, and twitter/ — no x-oauth/ directory.

The Settings page even references the callback URL (/api/import/x-oauth/callback) but the route was never created.

Steps to Reproduce

  1. Create an X Developer app with OAuth 2.0
  2. Go to Siftly Settings → paste Client ID and Client Secret → Save
  3. Go to Import → Live Import tab
  4. See "X OAuth not configured" and "Could not connect to the server"

Additional Notes

  • The error message is misleading — "Could not connect to the server" is actually a 404 caught by a generic .catch() block (line 710 of app/import/page.tsx)
  • The Bookmarklet and Console import methods work as alternatives

Environment

  • Siftly v0.1.0
  • Next.js 16.1.6
  • macOS / Chrome

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