Is there a mChat API

Support area for phpBB's mChat extension
kalle_wirsch
Posts: 2
Joined: 13 Oct 2019, 12:57

Is there a mChat API

Post by kalle_wirsch »

Hi,

I'm new here in the forum and I have a question:

I want to post status messages in mChat from an other machine that has no access to the mChat database or file system.
Is this possible? Is there something like an API to mChat?

kalle_wirsch
User avatar
kasimi
mChat developer
Posts: 1108
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: Is there a mChat API

Post by kasimi »

Hi and welcome kalle,

there is no API. You could write one, have a look at the Poll Votes add-on that adds a notification message when someone casts a vote in the forum.

The easier solution in your situation would probably be to just insert a new row into the phpbb_mchat table. Table structure: https://github.com/kasimi/mChat/blob/2. ... #L181-L191
kalle_wirsch
Posts: 2
Joined: 13 Oct 2019, 12:57

Re: Is there a mChat API

Post by kalle_wirsch »

Thank you for your reply, kasimi. Unfortunately writing to the database is not possible and PHP programming is also no option for me.
User avatar
kasimi
mChat developer
Posts: 1108
Joined: 06 Oct 2016, 09:56
Location: Germany

Re: Is there a mChat API

Post by kasimi »

It's certainly possible to write an extension that offers a micro API for adding mChat messages. For example, the endpoint could look like this:

Code: Select all

/mchat/add-message?username=[username]&password=[password]&message=[message]
As this would be an extension tailored to your needs, we should talk about the details and compensation in private. If you're interested feel free to PM me.

Who is online

Users browsing this forum: Bing [Bot], CCBot [Bot] and 0 guests