new_releases Update: Periksa
catatan rilis untuk mengetahui fitur baru dan update produk.
Method: phones.agentMessages.delete
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mencabut pesan agen yang telah dikirim tetapi belum terkirim.
Jika platform RBM berhasil mencabut pesan, pesan tersebut akan dihapus dari antrean pesan pengguna dan tidak pernah dikirimkan.
Metode ini akan segera menampilkan 200 OK, terlepas dari apakah pesan berhasil dicabut atau tidak.
Ada kemungkinan kecil bahwa agen dapat memulai pencabutan saat platform RBM sedang dalam proses pengiriman pesan. Dalam kasus yang jarang terjadi ini, agen menerima peristiwa pengguna DELIVERED untuk pesan tersebut segera setelah memulai permintaan pencabutan.
Permintaan HTTP
DELETE https://rcsbusinessmessaging.googleapis.com/v1/{name=phones/*/agentMessages/*}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
name |
string
"phone/{E.164}/agentMessages/{messageId}", dengan {E.164} adalah nomor telepon pengguna dalam format E.164 dan {messageId} adalah ID yang ditetapkan agen untuk pesan agen yang harus dicabut. Misalnya, dengan nomor telepon AS +1-222-333-4444 dan pesan agen dengan ID "12345xyz", endpoint yang dihasilkan adalah https://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentMessages/12345xyz.
|
Parameter kueri
Parameter |
agentId |
string
Wajib. ID unik agen.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons adalah objek JSON kosong.
Cakupan otorisasi
Memerlukan cakupan OAuth berikut:
https://www.googleapis.com/auth/rcsbusinessmessaging
Untuk mengetahui informasi selengkapnya, lihat OAuth 2.0 Overview.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-25 UTC."],[[["\u003cp\u003eThis function allows agents to revoke an undelivered message, removing it from the user's message queue.\u003c/p\u003e\n"],["\u003cp\u003eA successful message revocation results in the message being deleted and never delivered to the user, but a 200 OK response is always returned regardless of success.\u003c/p\u003e\n"],["\u003cp\u003eIn rare cases, a message revocation might be initiated while the message is being delivered, possibly leading to the agent receiving a DELIVERED event shortly after.\u003c/p\u003e\n"],["\u003cp\u003eThe revocation is performed via a DELETE request to a specific URL endpoint, which requires the user's phone number in E.164 format and the agent-assigned ID of the message.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires the agent's unique identifier as a query parameter and must use the specified OAuth scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: phones.agentMessages.delete\n\nRevokes an agent message that has been sent but not yet delivered.\n\nIf the RBM platform successfully revokes a message, then the message is deleted from the user's message queue and is never delivered.\n\nThis method immediately returns 200 OK, whether or not the message was successfully revoked.\n\nThere is a small chance that the agent may initiate a revocation while the RBM platform is in the process of delivering the message. In these rare cases, the agent receives a DELIVERED user event for the message shortly after initiating the revocation request.\n\n### HTTP request\n\n`DELETE https://rcsbusinessmessaging.googleapis.com/v1/{name=phones/*/agentMessages/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` \"phones/{E.164}/agentMessages/{messageId}\", where {E.164} is the user's phone number in E.164 format and {messageId} is the agent-assigned ID of the agent message that should be revoked. For example, with the US phone number +1-222-333-4444 and an agent message with the ID \"12345xyz\", the resulting endpoint would be \u003chttps://rcsbusinessmessaging.googleapis.com/v1/phones/+12223334444/agentMessages/12345xyz\u003e. |\n\n### Query parameters\n\n| Parameters ||\n|-----------|---------------------------------------------------|\n| `agentId` | `string` Required. The agent's unique identifier. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/rcsbusinessmessaging`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]