Back to APIs list

Matrix API examples & templates

Use these vals as a playground to view and fork Matrix API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
globalDocument
easrng
globalDocument
An interactive, runnable TypeScript val by easrng
githubEmoji
karfau
githubEmoji
Usage import {githubEmojiUrl} from "https://esm.town/v/karfau/githubEmoji"; console.log(githubEmojiUrl('+1')) //"https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8" or in a browser <img src="https://karfau-githubEmoji.web.val.run/+1"></img> Looks like in the preview. curl https://karfau-githubEmoji.web.val.run/+1 (prints "https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8" ) If the name you pass (as argument or in the request path) is not in the list, it returns The list of names can be accessed using githubEmojiNames or by calling https://karfau-githubemoji.web.val.run/names
HTTP
sendMatrixChatRoomMessage
vlad
sendMatrixChatRoomMessage
An interactive, runnable TypeScript val by vlad
getRotationFromFFmpegDisplayMatrixString
seflless
getRotationFromFFmpegDisplayMatrixString
An interactive, runnable TypeScript val by seflless
serverlessMatrixEchoBot
stevekrouse
serverlessMatrixEchoBot
// https://stevekrouse-serverlessMatrixEchoBot.express.val.run/_matrix/push/v1/notify
Express (deprecated)
joinMatrixRoom
vlad
joinMatrixRoom
An interactive, runnable TypeScript val by vlad
serverlessMatrixEchoBot2
stevekrouse
serverlessMatrixEchoBot2
An interactive, runnable TypeScript val by stevekrouse
sendMatrixChatRoomTextMessage
vlad
sendMatrixChatRoomTextMessage
An interactive, runnable TypeScript val by vlad
serverlessMatrixEchoBot
vlad
serverlessMatrixEchoBot
A example Serverless Bot for Matrix chat. See https://vlad.roam.garden/How-to-create-a-serverless-Matrix-Chat-bot for a more detailed write-up on how to set one up! To test this bot: invite serverless-echo@matrix.org to your unencrypted room Send a message starting with !echo and the bot will repeat content after. Use https://matrix-serverless.netlify.app/ to configure Matrix to call the endpoint on newly received messages
Express (deprecated)
matrixMediaToHttpUrl
vlad
matrixMediaToHttpUrl
An interactive, runnable TypeScript val by vlad
5
Next