Skip to content
A small and simple java API for the Matrix ClientServer Protocol
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
out/artifacts/Matrix_Client_Server_Java_API_jar
src/de/jojii/matrixclientserver
.gitignore
README.md

README.md

Matrix-ClientServer-API-java

A small and simple java API for the Matrix ClientServer Protocol (see clientServer api) The API is still in Beta and known for bugs. If you found or missing a feature one you can create a new issue.

Usage

Login

With credentials

//https not supported yet
Client c = new Client("http://matrix.your.server.xyz:8008");  
c.login("examplebot", "wordpass123", loginData -> {  
	if (loginData.isSuccess()) {    
		//Do sth with the bot
	} else {  
		System.err.println("error logging in");  
	}
});

With Usertoken

//https not supported yet
Client c = new Client("http://matrix.your.server.xyz:8008");  
c.login("Y0ur70ken", loginData -> {  
	if (loginData.isSuccess()) {    
		//Do sth with the bot
	} else {  
		System.err.println("error logging in");  
	}
});

For an examplebot you can have a look at my Grep Bot

Features

  • Login

    • UserID/Password
    • Usertoken
  • Events

    • Receive&Send roomevents (join, messages, typing, ....)
    • Get eventdata by EventID
    • Multiple eventlistener
    • Receive events happend when bot was offline
    • Custom sync filter
  • User

    • Presence
    • Typing
    • Receipts
    • Send text/messages (formatted and raw)
    • Login/Logout/Logout all
    • Join/leave room
    • Get roommembers
    • Kick
    • Ban
    • Unban
    • Create new room
You can’t perform that action at this time.