Configurar la aprobación para unirse al grupo
curl --request POST \
--url https://api.wppfy.com/group/updateJoinApproval \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"groupjid": "120363339858396166@g.us",
"IsJoinApprovalRequired": true
}
'import requests
url = "https://api.wppfy.com/group/updateJoinApproval"
payload = {
"groupjid": "120363339858396166@g.us",
"IsJoinApprovalRequired": True
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({groupjid: '120363339858396166@g.us', IsJoinApprovalRequired: true})
};
fetch('https://api.wppfy.com/group/updateJoinApproval', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wppfy.com/group/updateJoinApproval",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'groupjid' => '120363339858396166@g.us',
'IsJoinApprovalRequired' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/group/updateJoinApproval"
payload := strings.NewReader("{\n \"groupjid\": \"120363339858396166@g.us\",\n \"IsJoinApprovalRequired\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wppfy.com/group/updateJoinApproval")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"groupjid\": \"120363339858396166@g.us\",\n \"IsJoinApprovalRequired\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/group/updateJoinApproval")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"groupjid\": \"120363339858396166@g.us\",\n \"IsJoinApprovalRequired\": true\n}"
response = http.request(request)
puts response.read_body{
"response": "Group join approval enabled successfully",
"group": {
"JID": "120363339858396166@g.us",
"IsJoinApprovalRequired": true
},
"needs_refresh": false
}{
"error": "IsJoinApprovalRequired es obligatorio"
}Grupos y Comunidades
Configurar la aprobación para unirse al grupo
Define si los nuevos participantes deben ser aprobados antes de ingresar al grupo.
En el objeto devuelto en group y también en /group/info, este estado aparece en el campo IsJoinApprovalRequired.
Cuando está activado (IsJoinApprovalRequired=true):
- Los nuevos ingresos pasan por la aprobación de un administrador
- Las solicitudes pendientes pueden listarse en
/group/info
Cuando está desactivado (IsJoinApprovalRequired=false):
- Los ingresos por enlace/invitación no requieren aprobación adicional
Requiere que el usuario sea administrador del grupo.
POST
/
group
/
updateJoinApproval
Configurar la aprobación para unirse al grupo
curl --request POST \
--url https://api.wppfy.com/group/updateJoinApproval \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"groupjid": "120363339858396166@g.us",
"IsJoinApprovalRequired": true
}
'import requests
url = "https://api.wppfy.com/group/updateJoinApproval"
payload = {
"groupjid": "120363339858396166@g.us",
"IsJoinApprovalRequired": True
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({groupjid: '120363339858396166@g.us', IsJoinApprovalRequired: true})
};
fetch('https://api.wppfy.com/group/updateJoinApproval', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wppfy.com/group/updateJoinApproval",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'groupjid' => '120363339858396166@g.us',
'IsJoinApprovalRequired' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/group/updateJoinApproval"
payload := strings.NewReader("{\n \"groupjid\": \"120363339858396166@g.us\",\n \"IsJoinApprovalRequired\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wppfy.com/group/updateJoinApproval")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"groupjid\": \"120363339858396166@g.us\",\n \"IsJoinApprovalRequired\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/group/updateJoinApproval")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"groupjid\": \"120363339858396166@g.us\",\n \"IsJoinApprovalRequired\": true\n}"
response = http.request(request)
puts response.read_body{
"response": "Group join approval enabled successfully",
"group": {
"JID": "120363339858396166@g.us",
"IsJoinApprovalRequired": true
},
"needs_refresh": false
}{
"error": "IsJoinApprovalRequired es obligatorio"
}Autorizaciones
Cuerpo
application/json
