グループにメッセージを送信します。
操作説明
Before you call this operation, you must call to create an interactive messaging group. You can send messages to a group only if the group is active, which means that one or more users have joined the group. Offline messages are not supported. If you fail to send a message, check whether there are users in the group. If you want to send an offline message, we recommend that you store the message locally and send it after users come online.
QPS limits
You can call this operation up to 50 times per second per account. Requests that exceed this limit are dropped and you may experience service interruptions. We recommend that you consider this limit when calling this operation.
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
live:SendLiveMessageGroup |
none |
*Rtc
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| AppId |
string |
必須 |
メッセージの受信に使用されるインタラクティブなメッセージングアプリケーションの ID。 |
demo |
| GroupId |
string |
必須 |
メッセージを受信するグループの ID。 説明
指定された GroupId が利用可能であることを確認してください。利用できない場合、ResourceNotExist エラーが返されます。 |
grouptest |
| SenderId |
string |
必須 |
メッセージを送信するユーザーの ID。ID の長さは最大 64 バイトで、英字と数字を含めることができます。 |
uid1 |
| SenderMetaInfo |
string |
任意 |
メッセージを送信するユーザーの追加情報。値の長さは最大 512 バイトです。 |
uid1meta1 |
| Body |
string |
任意 |
メッセージ本文。長さは最大 15 KB です。 |
hello,group |
| MsgType |
integer |
任意 |
メッセージタイプ。単一のグループ内で送信されるメッセージタイプの合計数は 30 を超えることはできません。 |
1 |
| MsgTid |
string |
任意 |
メッセージの一意の識別子。このパラメーターはメッセージの削除に使用されます。ID には英字と数字のみを含めることができ、長さは最大 64 バイトです。 |
169830**** |
| StaticsIncrease |
integer |
任意 |
このタイプのメッセージ数の増加に対するメッセージの寄与度。デフォルト値: 1。 |
1 |
| Weight |
integer |
任意 |
メッセージの重み。デフォルト値: 1。
|
1 |
| NoStorage |
boolean |
任意 |
メッセージストレージを無効にするかどうかを指定します。有効な値: true および false。デフォルト値: false。これは、メッセージが 30 日間の有効期間で保存されることを示します。ListLiveMessageGroupMessages 操作の応答でメッセージを確認できます。メッセージを保存する必要がない場合は、このパラメーターを true に設定します。 |
false |
| NoCache |
boolean |
任意 |
グループ内の最新メッセージのリストへのメッセージキャッシュを無効にするかどうかを指定します。有効な値: true および false。デフォルト値: false。これは、メッセージがキャッシュされることを示します。 |
false |
| DataCenter |
string |
任意 |
データセンター。 CreateLiveMessageApp で指定されたデータセンターと同じである必要があります。有効な値:
|
cn-shanghai |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
The returned results. |
||
| RequestId |
string |
The ID of the request. |
E4C1245F-597B-1BD1-B9BB-9D220E99**** |
| MsgTid |
string |
The unique identifier of the message, which can be used to delete the message. The ID can contain only letters and digits and can be up to 64 bytes in length. |
169830**** |
例
成功レスポンス
JSONJSON
{
"RequestId": "E4C1245F-597B-1BD1-B9BB-9D220E99****",
"MsgTid": "169830****"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InputInvalid | %s. | |
| 400 | ErrorTooManyMsgTypes | %s. | |
| 500 | ServerError | %s. | |
| 403 | NoAuth | %s. | |
| 404 | ResourceNotExist | %s. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。