A minimal Channel App Store app built with the official Channel App SDK. The tutorial uses the SDK for the function registry, schemas, command extension, versioned HTTP route, extension auto-registration, token lifecycle, and request-signature verification.
Use this repository for a runnable end-to-end app. Use the SDK repository for the API contract and design guidance:
- English first-app quickstart
- English app-development guide
- English concepts: Function, Extension, WAM, and authentication
- English Extension guide
- 한국어 앱 개발 전체 가이드
- 한국어 핵심 개념
- 한국어 Extension 전체 가이드
- 日本語アプリ開発完全ガイド
- 日本語の基本概念
- 日本語 Extension 完全ガイド
- Go feature parity
- Go SDK reference
- Go authentication and tokens
- WAM SDK
- the
github.com/channel-io/app-sdk/goversion pinned ingo.mod - a
commandextension registered through the SDK builder - typed app functions and generated JSON schemas
- SDK-managed app/channel token caching and refresh
- the SDK Gin server at
/functions/:version - a React WAM using
@channel.io/app-sdk-wam0.17.2 - a language-neutral JSON Schema checked against both Go DTOs and TypeScript WAM data
- redesigned Bezier components from
@channel.io/bezier-react/beta
Run the /tutorial desk command in a group chat to open a WAM. The WAM can send a team-chat message
either through the app bot or as the current manager. Other chat types show an explicit unsupported
message instead of silently closing.
Concepts in this repository map to concrete code as follows:
- Extension: the command builder publishes command metadata as the versioned
commandcapability. - Function:
tutorial.openandtutorial.sendAsBotare standalone typed operations referenced by the command and WAM. - WAM: the React UI is served at
/resource/wam/tutorial;useCallFunctioncalls the app server anduseNativeFunctionacts as the current manager. - Authentication: the SDK server verifies inbound signatures,
native.TokenManagercaches the channel token used by the bot path, the server signs the allowed group-chat target before giving it to the WAM, and the Channel host owns manager authorization.
The bot path obtains a channel token through native.TokenManager and calls
native.ProxyAPI.WriteGroupMessage; the app does not implement Native Function HTTP transport.
This tutorial follows the public SDK runtime contract:
- SDK-owned typed function and extension discovery
PUT /functions/:version(/functions/v1here)- signature verification and SDK token lifecycle
- AppStore extension registration after deployment
- a narrow ingress compatibility route from bare
PUT /functionscalls to the same verified SDK handler when the caller does not carry a system version
This app pins the latest Go SDK release and exposes the Function and WAM endpoint roots directly.
- Go 1.25
- Node.js and Yarn 4 through Corepack (for the WAM)
- a private Channel App with an App ID, App Secret, and Signing Key
If you do not have an app yet, start with the SDK's first-app quickstart. It covers private-app creation, server-side credentials, minimum permissions, endpoint roots, and test-channel installation.
Enable these permissions in the app's Authentication and permissions settings:
- Channel:
writeGroupMessage - Manager:
writeGroupMessageAsManager
git clone https://github.com/channel-io/app-tutorial.git
cd app-tutorial
corepack enablecp .env.example .envFill in APP_ID, APP_SECRET, and the hex-encoded SIGNING_KEY, then load the file into your shell:
set -a
. ./.env
set +aKeep secrets out of Git.
Start or reserve an HTTPS tunnel to local port 3022, then save these roots in the developer portal
before starting the auto-registering server:
- Function Endpoint:
https://YOUR_HOST/functions - WAM Endpoint:
https://YOUR_HOST/resource/wam
Do not append /v1 or /tutorial. If credentials, permissions, or endpoints change after the
server starts, restart the server so auto-registration runs again.
The SDK route itself remains versioned. The tutorial also accepts bare PUT /functions through the
same verified SDK handler because current command execution can call the configured Function
Endpoint without a system-version suffix. Both paths reuse the same signature verification.
make build
make runOr run the verified test suite separately:
make testThe defaults expose:
| Setting | URL |
|---|---|
| Function Endpoint | https://YOUR_HOST/functions |
| WAM Endpoint | https://YOUR_HOST/resource/wam |
| Health check | http://localhost:3022/ping |
| Local WAM | http://localhost:3022/resource/wam/tutorial |
After the server reports successful startup and extension registration, install or refresh the
private app in the test channel and run /tutorial in a group chat. Verify both sender buttons and
a permission-failure case. Do not set SKIP_SIGNATURE_VERIFICATION=true outside local debugging.
cmd/main.go SDK server and extension auto-registration
cmd/function_endpoint.go bare Function Endpoint compatibility route
internal/tutorial/app.go command metadata and typed app functions
internal/tutorial/contracts.go Go types and names for the public WAM contract
internal/tutorial/native_message.go SDK token manager and typed ProxyAPI call
contracts/ language-neutral WAM wire schema
wam/src/contracts.ts TypeScript view and runtime validation of that schema
wam/src/pages/Send/Send.tsx WAM SDK hooks for app/native calls
Use the SDK guides and references for the current contract, and use this repository for its complete Go server-and-WAM implementation. The SDK Quickstart links here as the runnable Go example.