SysChannelConnect
Connect to a chat channel.
Service | Operation |
---|---|
chat | SYS_CHANNEL_CONNECT |
Method Parameters
Parameter | Description |
---|---|
channelId | The channel id to connect to. |
maxReturn | Max channel messages to return. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var channelId = "55555:sy:mysyschannel";
var maxReturn = 10;
var chatProxy = bridge.getChatServiceProxy();
var postResult = chatProxy.SysChannelConnect(channelId, maxReturn);
{
"service":"chat",
"operation":"SYS_CHANNEL_CONNECT",
"data":{
"channelId":"55555:sy:mysyschannel",
"maxReturn":10
}
}
JSON Response
{
"data": {
"messages": [
{
"date": 1698765119868,
"ver": 1,
"msgId": "869767741372417",
"from": {
"name": "Homer",
"pic": "http://www.simpsons.test/homer.jpg",
"id": ""
},
"content": {
"text": "Hello world",
"custom": {
"somethingCustom": "wow"
}
},
"expiresAt": 1701357119868,
"chId": "55555:sy:mysyschannel",
"updatedAt": 1698765119868
}
]
},
"status": 200
}