Skip to main content

API access broken w/ non-public privacy modes

After this got implemented, non-authenticated API call with a correct API key returns {"success":false,"error":"This profile is private"}.

This design makes no sense, I should be able to fetch my profile data with my own API key no matter what privacy level I have set. Thanks!

Status: Completed2 comments

Log in to comment and vote

Comments2

  • @levelsio

    Team•

    Oct 4

    Fixed!

    “Cause: The profile JSON (/@username.json) has a separate privacy check for each level in app/index.php. The old members_only level already let the owner's ?key= through. The newer private and following levels, from the 16 September privacy change, did not check the key. So members with those levels got "This profile is private", even with their own correct key.

    Fix: The private and following check now also accepts the owner's own key, the one from Settings → "🔑 MCP + API key". The code compares the key with hash_equals.”

    • Yellow Nucleon

      •

      Oct 4

      ❤️