Mengirim Paket ke kelompok.
Deskripsi operasi
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.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:SendLiveMessageGroup |
none |
*Rtc
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
ID aplikasi pesan interaktif yang menerima Paket. |
demo |
| GroupId |
string |
Yes |
ID kelompok yang menerima Paket Catatan
Pastikan GroupId yang ditentukan tersedia. Jika tidak, error ResourceNotExist akan dikembalikan. |
grouptest |
| SenderId |
string |
Yes |
ID pengguna yang mengirim Paket. ID dapat memiliki panjang hingga 64 byte dan dapat berisi huruf serta angka. |
uid1 |
| SenderMetaInfo |
string |
No |
Informasi tambahan tentang pengguna yang mengirim Paket. Nilai dapat memiliki panjang hingga 512 byte. |
uid1meta1 |
| Body |
string |
No |
Isi Paket. Panjang maksimum 15 KB. |
hello,group |
| MsgType |
integer |
No |
Tipe Paket. Jumlah total tipe Paket yang dikirim dalam satu kelompok tidak boleh melebihi 30. |
1 |
| MsgTid |
string |
No |
Identifikasi unik Paket. Parameter ini digunakan untuk menghapus Paket. ID hanya boleh berisi huruf dan angka serta dapat memiliki panjang hingga 64 byte. |
169830**** |
| StaticsIncrease |
integer |
No |
Kontribusi Paket terhadap peningkatan jumlah Paket dari tipe ini. Nilai default: 1. |
1 |
| Weight |
integer |
No |
Bobot Paket. Nilai default: 1.
|
1 |
| NoStorage |
boolean |
No |
Apakah akan menonaktifkan penyimpanan Paket. Nilai valid: true dan false. Nilai default: false, yang menunjukkan bahwa Paket disimpan selama periode validitas 30 hari. Anda dapat mencari Paket di tanggapan operasi ListLiveMessageGroupMessages. Untuk melewati penyimpanan Paket, atur parameter ini ke true. |
false |
| NoCache |
boolean |
No |
Apakah akan menonaktifkan caching Paket dalam daftar Paket terbaru di kelompok. Nilai valid: true dan false. Nilai default: false, yang menunjukkan bahwa Paket di-cache. |
false |
| DataCenter |
string |
No |
Pusat data lokal, yang harus sama dengan Pusat data lokal yang ditentukan di CreateLiveMessageApp. Nilai valid:
|
cn-shanghai |
Elemen respons
|
Element |
Type |
Description |
Example |
|
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**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "E4C1245F-597B-1BD1-B9BB-9D220E99****",
"MsgTid": "169830****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InputInvalid | %s. | |
| 400 | ErrorTooManyMsgTypes | %s. | |
| 500 | ServerError | %s. | |
| 403 | NoAuth | %s. | |
| 404 | ResourceNotExist | %s. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.