Follow

I can't seem to find how to post a response to a status on another instance via the Mastodon API.

Passing the ID as the `in_reply_to_id` parameter produces a 404 because the status can't be found. That makes some sense, as that status isn't on the instance I'm calling out to (right?). Switching the API base URL to the other instance gives me a 401, because I don't have an API app set up there.

What am I missing here? Any pointers would be greatly appreciated.

Got it. This is how federation works.

You need the local ID for the status you’re replying to. mastodon.social/@jkreeftmeijer is posted on mastodon.social, but you need the ID from mastodon.technology/web/status when posting a reply on mastodon.technology, for example.

To get the local ID for a Mastodon status on another instance, use the search API (docs.joinmastodon.org/api/rest), or the search bar in your web client.

Searching for a status URL (like mastodon.social/@jkreeftmeijer) returns the status on your instance, including the local ID.

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!