curl --request DELETE \
--url https://gate.whapi.cloud/groups/GROUP_ID/participants \
--header 'accept: application/json' \
--header 'authorization: Bearer Your_Token' \
--header 'content-type: application/json' \
--data '
{
"participants": ["12345678901"]
}'
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gate.whapi.cloud/groups/GROUP_ID/participants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => "{\"participants\":[\"12345678901\"]}",
CURLOPT_HTTPHEADER => [
"accept: application/json",
"authorization: Bearer Your_Token",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://gate.whapi.cloud/groups/GROUP_ID/participants"
payload = {"participants": ["12345678901"]}
headers = {
"accept": "application/json",
"authorization": "Bearer Your_Token",
"content-type": "application/json",
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)
const url = 'https://gate.whapi.cloud/groups/GROUP_ID/participants';
const response = await fetch(url, {
method: 'DELETE',
headers: {
accept: 'application/json',
authorization: 'Bearer Your_Token',
'content-type': 'application/json',
},
body: JSON.stringify({
participants: ['12345678901'],
}),
});
console.log(await response.text());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"participants\":[\"12345678901\"]}");
Request request = new Request.Builder()
.url("https://gate.whapi.cloud/groups/GROUP_ID/participants")
.delete(body)
.addHeader("accept", "application/json")
.addHeader("authorization", "Bearer Your_Token")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
using RestSharp;
var options = new RestClientOptions("https://gate.whapi.cloud/groups/GROUP_ID/participants");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
request.AddHeader("authorization", "Bearer Your_Token");
request.AddHeader("content-type", "application/json");
request.AddStringBody("{\"participants\":[\"12345678901\"]}", DataFormat.Json);
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"participants":["12345678901"]}`)
req, _ := http.NewRequest("DELETE", "https://gate.whapi.cloud/groups/GROUP_ID/participants", body)
req.Header.Set("accept", "application/json")
req.Header.Set("authorization", "Bearer Your_Token")
req.Header.Set("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}