HTML5 启动 iOS IM 界面的方法
好热闹
两种 IM 聊天
基本需求
- 管理员可以创建群组
- 用户可加入、退出群组
- 用户之间可以单聊
- 要有一个界面维护用户加入的群组
- 如果当前用户/管理员是群组的创建者,可以解散群组
- 具体接口参见: IM文档
基本流程
启动单聊
Description
启动单聊
Method and URL Structure
| Method |
Resouce URL |
| GET |
aichashuo://enter_single_chat/ |
Request Parameters
| Name |
Description |
Required |
Default |
| username |
用户名 |
YES |
|
| password |
密码 |
YES |
|
| token |
用户 token |
YES |
|
| to_username |
单聊对象 |
YES |
|
Request
{ "username":"username", "password":"password", "token":"token", "to_username":"username", }
cURL Example
aichashuo://enter_single_chat/?username=18002&password=123456&to_username=18030&token=QBe+hbw/q0rShpFN4k/REBM
启动群聊
Description
启动单聊
Method and URL Structure
| Method |
Resouce URL |
| GET |
aichashuo://enter_rong_chatroom/ |
Request Parameters
| Name |
Description |
Required |
Default |
| username |
用户名 |
YES |
|
| password |
密码 |
YES |
|
| token |
用户 token |
YES |
|
| group_id |
群 ID |
YES |
|
Request
{ "username":"username", "password":"password", "token":"token", "group_id":1234, }
cURL Example
aichashuo://enter_rong_chatroom/?username=18001234&password=123456&group_id=555&token=QBe+hbw/q0rShpFN8k/REBM
启动客服
Description
启动单聊
Method and URL Structure
| Method |
Resouce URL |
| GET |
aichashuo://enter_custom_service/ |
Request Parameters
| Name |
Description |
Required |
Default |
| username |
用户名 |
YES |
|
| password |
密码 |
YES |
|
| token |
用户 token |
YES |
|
| id |
客服公众号 ID |
YES |
|
| name |
客服公众号昵称 |
YES |
|
Request
{ "username":"username", "password":"password", "token":"token", "id":"haorenao_cs_001", "name":u'我的客服', }
cURL Example
aichashuo://enter_custom_service/?id=haorenao_cs_001&name=我的客服&username=180123456&password=123456&token=QBe+hbw/q0rShpFN8k/REBM