POST api/Files/ZcChatUpload

Chat messages submitted to the server/special interface

Request Information

Body Parameters

parameter

ZcVoiceUploadModel
NameDescriptionTypeAdditional information
SerialNumber

device imei

string

None.

Long

Speech time

integer

None.

UserId

user id

integer

None.

SendFrom

The sender's IMEI (APP is the cell phone number, the watch is IMEI number), and the group chat group ID number

string

None.

FromType

Sender type 0.APP 1.whatch 2.goup chat

integer

None.

FromNickName

Issued nickname

string

None.

SendTo

Target IMEI (APP for cell phone number, watch as IMEI number), group ID number

string

None.

ToType

Receiver type: 0.APP 1.whatch 2.group chat

integer

None.

Type

type 0.APP 1.whatch 2.gruop chat

integer

None.

MsgType

0:text 1:voice 2.picture 3: expression

integer

None.

Content

Chat content. If it is a picture or voice, it needs to be converted to Base64. If it is text, put it directly in the text, and the corresponding MsgType needs to be set correctly

string

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

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 status illustrate
0. Indicates success
1000. stands device does not exist
2002. The content is too long and the length is limited 400

NormalResult
NameDescriptionTypeAdditional information
Message

Message [in most cases, the message can be used as a prompt]

string

None.

State

status code

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>