Skip to content

Instantly share code, notes, and snippets.

@jeluard
Created April 6, 2018 11:09
Show Gist options
  • Save jeluard/c56f184332b2e8ca51354c5d277826a9 to your computer and use it in GitHub Desktop.
Save jeluard/c56f184332b2e8ca51354c5d277826a9 to your computer and use it in GitHub Desktop.

Existing chat applications usually offer APIs to extend the default UI. This document details features provided by a selection of those.

WhatsApp

Pretty much nothing.

Kik

Basic chatbot based on webhooks and HTTP calls.

Notable features:

  • custom keyboard
  • basic JS API for web integration

Fairly limited.

iMessage

2 types of extensions:

App extensions build on a complexe native API. Pretty close to creating a full iOS app.

Telegram

Bot API

Bots are special account with no phone number attached. Message based, they interract via MProto protocol.

Notable features:

Limitations:

  • communication funneled via Telegram intermediary servers
  • almost purely text based
  • centralized
  • hosted on server

Telegram API

Build your own customized Telegram client. Facilitated by TDLib library (powers Telegram X). Encaspulte low level Telegram protocol and message persistency. Still very low level.

Toshi

Chatbots are JS programms that can send replies. Those replies can encapsulate UI by leveraging SOFA model. Those UI elements will show up inline in the chat and might trigger messages to be sent back (based on user interaction).

Other notable features:

  • UI elements can link back to webviews
  • bots have lifecycle (init, on message, on command, on payment request)
  • session can persist data accross restarts
  • access to web3.js

Limitations:

  • purely chat message based
  • require bot registration
  • limited to features exposed by SOFA
  • app has an associated wallet (requiring full address creation)
  • must be hosted implementer platform (Java based, redis, PostgreSQL)
  • centralised (session backed in implementer db)
  • rely on toshi web services (again centralized)
  • complex dev model (docker based)

Facebook Messenger

Messenger platform allows to build messenger based chat bots. It relies on web services and webhooks.

Notable features:

Limitations:

WeChat

The elephant in the room.

Extensions are a corner stone of WeChat. Therefore WeChat offers various extensions technologies : Official Accounts, native mobel SDK , web integration with JSSDK, mini programs. They also provide interresting use cases. Payment support is ubiquitous.

WeChat founder shares interesting insights about the motivation behind Mini Programs.

Mini Programs

Mini Programs are full website built using custom languages (wxml, wxss). They are closely related to websites but incompatible. Comprehensive [design guide])(http://open.wechat.com/cgi-bin/newreadtemplate?t=overseas_open/docs/mini-programs/design#designing-mini-programs) and documentation are available.

Min programs are complete programs displayed as a new screen that are launched after scanning a QR code. They are essentially centralized DApps.

Limitations:

  • complex registration / verification process
  • updates must be validated

Official Accounts

Official Accounts allow institution to have a presence in WeChat. They are akin to Facebook pages in a chat world. A user can chat with the institution representative, register to push notifications and access links/details. Those pages can grow in complexity and be similar to Mini Programs (technically plain web site with access to JSSDK).

Some Official Accounts type can be listed as regular account.

Limitations:

  • very complex to create one
  • farly limited capacities

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment