• HTTP API available on clrghouz

    From deon@21:2/116 to All on Sun Aug 24 14:46:23 2025
    Howdy,

    I've had a bit of renewed energy to work on clrghouz of late (I was working on something else for the last few months), so I've implemented at HTTP API.

    The only thing that I've set up at the moment is netmail, so you can HTTP "post" to send a netmail, and HTTP "get" to get the netmail that is in the queue to be sent to you (in packet form).

    If anybody wants to play with it, let me know. Hub 3 users are pretty much ready to use it - you just need to create a HTTP API token (Bearer token) and then start sending your HTTP requests.

    Non Hub 3 users will need to login to clrghouz, claim your BBS and then you'll be set to go.

    I'll add a swagger interface to clrghouz, so you'll be able to see what endpoints are available and how to use them.

    Yell out if you have questions.


    ...δεσ∩
    --- SBBSecho 3.27-Linux
    * Origin: I'm playing with ANSI+videotex - wanna play too? (21:2/116)
  • From slacker@21:3/193 to deon on Sun Aug 24 06:48:44 2025
    Nice!! I'd be interested to give it a try!

    Is there a new section on the page for the API and create the bearer token? I just checked and can't seem to find it.

    Thanks!


    --- NE BBS v1.11.1 (linux; x64)
    * Origin: NE BBS - nebbs.servehttp.com:9223 (21:3/193)
  • From deon@21:2/116 to slacker on Mon Aug 25 08:00:13 2025
    Re: Re: HTTP API available on clrghouz
    By: slacker to deon on Sun Aug 24 2025 06:48 am

    Hey Slacker,

    Nice!! I'd be interested to give it a try!

    Is there a new section on the page for the API and create the bearer token? I just checked and can't seem to find it.

    The Bearer token is actually associated with your BBS (aka "System" in clrghouz speak), you should see it when you click on your BBS.

    I need to put up a swagger UI that gives you the documentation that you need, but once you have your token you can hit:

    GET: /api/whoami
    GET/POST: /api/mail/new

    When posting a message you need "to", "from", "subject", "date" and a base64encoded "body". Date needs to be in ISO 8601 format, eg:
    2025-08-21T10:15:19.000000+10:00

    If your post is successful, you should get a 200 with a msgid returned, otherwise an error message, explaining why.

    I havent integrated the posting into clrghouz's response engine, so sending a message to clrghouz (eg: ping/areafix) wont respond - but I'll add that in due course.

    Let me know if you have stuck or something doesnt work as expected.


    ...δεσ∩
    --- SBBSecho 3.27-Linux
    * Origin: I'm playing with ANSI+videotex - wanna play too? (21:2/116)