getTextForm (v1.1)

Estimated reading time: 1 minute

此API返回软件键盘字段上的当前文本输入。 此版本支持加密的文本数据传输。

注意

Please find more details about encryption here.

语法

http://<Base URL>/appControl

认证级别

private

需求

params' Elements
An object composed of the following pair(s).
name type multiplicity default description
encKey string ? "" 由公钥加密的加密密钥。 默认值是“”,这意味着数据没有加密。
JSON Example
{
    "method": "getTextForm",
    "id": 60,
    "params": [{}],
    "version": "1.1"
}
{
    "method": "getTextForm",
    "id": 60,
    "params": [{"encKey": "AAAAB3NzaC1yc2EAAAABIwAAAQEA3p6TmGYDRtnnmzckD5leg7lHIUY9cuV6vFvacew1uZ7Bmx2MF9a7SqmtiLDkLS3P9y9eobRjuWriSfgmqDPRFRU2mdwAmRm2aIvYa6WkzvnrfUhGR+SCT/Z62j7V9ps6Mt5HB8mFQj3494p4StTPVS1nFqvEUazEx13EJnJyHsdYqsV6UJV169e43oLSSccb3lr8BzeMUnGEfY+NKlAxDpEycr5jJYyTkLfrbX0lyAPs+vLwLRYhm+h2qJYAZUwknus4vD7aki4G69S+gnENClglh/e9ut9Q5BrtxiBQCEikn9V9rlnVkbp1eEUf89XFiHRWMVrRAINtJyQFvvoPOQ=="}],
    "version": "1.1"
}

反馈

result's Elements
An object composed of the following pair(s).
name type multiplicity default description
text string 1 Text data encoded by UTF8. If encKey is set, this must be encrypted.
JSON Example
{
    "result": [{"text": "hello world!!"}],
    "id": 60
}
{
    "result": [{"text": "dtA6UNsMnahxCkfGdrc8AFhisnFZg8FnKTl7Sk4Wg9J8gYK8+Dv6Io7Ssef7ZPTo"}],
    "id": 60
}
Error Code
The following error codes are important for this API. Refer to error code for other errors.
code Explanation
7 Software keyboard is not active
40002 Encryption error
40003 Client must wait for the previous response.

附录

反馈指导

  • 必须始终设置“encKey”。
  • 否则,返回错误#3“非法参数”。
Last modified: 13 Feb 2019