Back to APIs list

Telegram API examples & templates

Use these vals as a playground to view and fork Telegram API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
ejfox avatar
addToLog
@ejfox
HTTP
* This chat application allows users to post messages and view a log of all messages. * It uses SQLite for persistence and React for the frontend. * The server handles message posting and retrieval, while the client renders the UI.
cephalization avatar
smsjournalertextrelay
@cephalization
HTTP (deprecated)
* This val creates a webhook endpoint that receives text messages and sends SMS replies using the TextBelt API. * It uses blob storage to keep track of message history and conversation state. * The TextBelt API is used for sending SMS messages without requiring an API key. * The conversation history is stored as an array of message objects containing sender, content, date, and phone number. * OpenAI's GPT-4 is used to generate contextual responses based on the conversation history.
andreterron avatar
twitter
@andreterron
Script
Login with ~~Twitter~~ 𝕏 Use this val to login with 𝕏 and save your token into a twitter_token val Usage Fork this val Change the 🔒 privacy to "Unlisted" Navigate to https://developer.twitter.com/en/portal/dashboard to create an OAuth app and save your client id and secret to your secrets page Navigate to https://{your_username}-twitter.web.val.run to authenticate with 𝕏 And then you'll have your tokens saved to a twitter_token val! Other ~~Twitter~~ 𝕏 helper vals Refresh your tokens: https://www.val.town/v/andreterron/refreshTwitterToken Fetch user by id: https://www.val.town/v/andreterron/fetchTwitterUser Search posts: https://www.val.town/v/andreterron/searchTweets Write an X post: https://www.val.town/v/andreterron/postTweet
curtcox avatar
transmitter
@curtcox
HTTP (deprecated)
Forked from curtcox/echo
stevekrouse avatar
tell2
@stevekrouse
Script
// Store messages via SQLite
rodrigotellovaltown avatar
consoleEmailEx
@rodrigotellovaltown
Script
Forked from felipesabino/consoleEmailEx
tempguy avatar
redMonkey
@tempguy
Script
An interactive, runnable TypeScript val by tempguy
tempdev avatar
rabbitstream
@tempdev
HTTP
// Full .ts implimentation of rabbitstream.net
rkartzman avatar
twitterAlert
@rkartzman
Cron
Forked from geoffreylitt/twitterDailyDigest
ryoid avatar
chat
@ryoid
Script
An interactive, runnable TypeScript val by ryoid
frontsideair avatar
exchangeRate
@frontsideair
Script
An interactive, runnable TypeScript val by frontsideair
nimalu avatar
chat
@nimalu
Script
// https://api.val.town/express/@nimalu.chat
mttlws avatar
valTownChatGPT
@mttlws
HTTP (deprecated)
Forked from simonw/valTownChatGPT
dctalbot avatar
pirateTalk
@dctalbot
HTTP (deprecated)
A Slack bot which rephrases messages in a channel in the voice of a Pirate. Originally built for National Talk Like a Pirate Day, September 19, 2024. https://www.youtube.com/watch?v=B8TVMgrZbwo
neverstew avatar
valtownForwarder
@neverstew
Script
Forked from stevekrouse/testEmail2
nishui avatar
biliStream
@nishui
Cron
what is this? ~这是一个用来检测主播是否直播,访问方法为:https://api.val.town/v1/run/nishui.biliStream?args=[xxx]~ ~其中 args=[id] 中的 id 是直播房间号码~ ~现在是多参数 ?args=[[xxx]] ~ 因为不了解 js、TypeScript 语言,决定还是不使用传送过来的参数了,用自定义的列表 id 来每隔 15m 自动获取是否直播,最后打包总结果返回 email 。