POST api/Files/ZcChatUpload

聊天信息提交服务器 [专用接口]

Request Information

Body Parameters

参数

ZcVoiceUploadModel
NameDescriptionTypeAdditional information
SerialNumber

设备 imei

string

None.

Long

语音时长

integer

None.

UserId

用户 id

integer

None.

SendFrom

发送方的IMEI(APP为手机号,手表为imei号),群聊为群ID号

string

None.

FromType

发送方类型 0.APP 1.手表 2.群聊

integer

None.

FromNickName

下发者昵称

string

None.

SendTo

目标IMEI(APP为手机号,手表为imei号),群聊为群ID号

string

None.

ToType

接收方类型: 0.APP 1.手表 2.群聊

integer

None.

Type

类型 0.APP 1.手表 2.群聊

integer

None.

MsgType

0:文本 1:声音 2:图片 3:表情

integer

None.

Content

聊天内容。如果为图片或语音,需转换为 Base64,如果是文字,则直接放入文字,相对应的 MsgType 需设置正确

string

None.

Token

登录后获取到的 Token

string

None.

Language

语言选项

string

None.

AppId

APP应用标识

string

None.

Request Formats

application/json, text/json

Sample:
{
  "SerialNumber": "sample string 1",
  "Long": 2,
  "UserId": 3,
  "SendFrom": "sample string 4",
  "FromType": 5,
  "FromNickName": "sample string 6",
  "SendTo": "sample string 7",
  "ToType": 8,
  "Type": 9,
  "MsgType": 10,
  "Content": "sample string 11",
  "Token": "sample string 12",
  "Language": "sample string 13",
  "AppId": "sample string 14"
}

application/xml, text/xml

Sample:
<ZcVoiceUploadModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 14</AppId>
  <Language>sample string 13</Language>
  <Token>sample string 12</Token>
  <Content>sample string 11</Content>
  <FromNickName>sample string 6</FromNickName>
  <FromType>5</FromType>
  <Long>2</Long>
  <MsgType>10</MsgType>
  <SendFrom>sample string 4</SendFrom>
  <SendTo>sample string 7</SendTo>
  <SerialNumber>sample string 1</SerialNumber>
  <ToType>8</ToType>
  <Type>9</Type>
  <UserId>3</UserId>
</ZcVoiceUploadModel>

Response Information

Resource Description

State状态说明
0. 表示成功
1000. 表示设备不存在
2002. 内容太长,限制长度 400

NormalResult
NameDescriptionTypeAdditional information
Message

消息 [大多数情况下可通过该消息做为提示语]

string

None.

State

状态码

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Message": "sample string 1",
  "State": 2
}

application/xml, text/xml

Sample:
<NormalResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>2</State>
  <Message>sample string 1</Message>
</NormalResult>