One piece of code, five channels
You do not write one flow per channel. The SDK reads the channel type and dispatches the right flow by itself:What happens under the hood
1
The SDK queries the channel
It calls
GET /instances/{channelId}/sdk-info to find out the channel type, the matching Meta app and the allowed origins.2
It dispatches the type's flow
Each type has its own authorization path — Meta OAuth, QR Code or bot token.
3
It returns the connection data
The returned object changes depending on the channel. See the table below.
4
You finish on the backend
Send the result to
POST /v1/channels/{channelId}/connect using the Secret Key.Authorization flow per channel
The response changes per channel
All of them returnsuccess and channelId. The rest depends on the type:
Do not handle these fields manually. Send the whole object to your backend and forward it as-is to the connect endpoint — it knows what to do with each type.