Published a blog about the new Social Inbox tool we've made at which makes it easy to add to your static websites.

blog.mauve.moe/posts/distribut

@mauve This looks really cool. I've managed to get the static part working with my hugo site: @site

However, got stuck on registering the account on the inbox server. Any chance for a more user friendly interface or better documentation how to do it for example with curl?

@rra @site Hmm are you self hosting your inbox instance? We have swagger docs generated at /v1/docs

Sadly swagger doesn't have the HTTP auth stuff built in so we don't have an out of the box UI yet.

We use the http signature spec for authentication so you shoukd sign yout request with the private key corresponding to your actor's public key: docs.joinmastodon.org/spec/sec

@mauve ah the swagger docs are really handy. So if I understand correctly I won't be able to complete my post request with curl, but need to use client.setInfo() instead?

@rra sadly the client API is still a WIP but my colleague should be getting to it next week ish. I'll see if I can get a lil somethin done before then though.

technically it should be possible to do it witg curl, you just need to do the digest calculation and signing stuff with openssl or similar. Sadly I don't have ready examples of it cause we did it in js.

Here's how we do it so far: github.com/hyphacoop/social.di

@mauve Hi thanks for the suggestion! Together with @cblgh we managed to recreate the signing code pretty close before you sent it! However we get Bad Request but we're also unsure whether we're overlooking something. Maybe you have an idea?

gist.github.com/rscmbbng/63a30

@rra @cblgh Oh I think you're missing the `Content-Type` header indicating the body is JSON

@mauve @cblgh I'm still getting a 400 ("message": "\"[object Object]\" is not valid JSON") so I'm guessing our script doesnt send something yours likes. Anyway I'm out of ideas. If you have a moment to make a script based on the repos code to request an account that would be appreciated. Otherwise I'll wait for a later stage of the release.

Follow

@rra @cblgh ah that's due to your code passing in the parsed object of the credwntials instead of the credentials atrinf. Fetch doesn't automatically json stringify sadly

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.