TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: '919876543210', // the phone to act with (x-phone)
});
async function main() {
const response = await client.messages.deleteMessage({
message_id: 'true_911111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
});
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/message/true_911111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/delete' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210'Message APIs
Delete Message
Deletes a message for everyone in the chat. Permanent, and subject to the WhatsApp delete-for-everyone time window.
TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: '919876543210', // the phone to act with (x-phone)
});
async function main() {
const response = await client.messages.deleteMessage({
message_id: 'true_911111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
});
console.log(response);
}
main();curl -X POST 'https://api.periskope.app/v1/message/true_911111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/delete' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'x-phone: 919876543210'Authorizations
Headers
Optional. Phone to act with: country code + number without symbols or spaces (e.g. 911111111111), or a phone_id (phone-xxxxxxxxxxxx). Omit to let the API select an eligible phone automatically — within the token's phone scopes and connected; chat actions use a phone that has the chat (a group admin where required), message actions use the phone the message belongs to.
Example:
"919876543210"
Path Parameters
Response
The message was deleted
Was this page helpful?