Send Text
The sendText API can send arbitrary text to devices, supporting Chinese, English, numbers, symbols, and emojis.
API Description
The sendText API automatically handles different types of text:
- Regular characters (letters, numbers, common symbols): Input directly via keyboard
- Other characters (Chinese, emojis, etc.): Automatically write to clipboard via Shortcuts and paste
⚠️ Note: When sending non-regular characters, you need to install and bind the official Shortcut on the target device. See Shortcut APIs.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| deviceId | string | Yes | Target device ID |
| text | string | Yes | Text content to send |
Example
javascript
// Send text with emoji
await apiInvoke('sendText', {
deviceId: 'P72578581E07',
text: '你好,Hello iClick! 😄'
});