Listar conversaciones
curl --request GET \
--url https://api.wegluu.com/v1/conversations \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wegluu.com/v1/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wegluu.com/v1/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "whatsapp",
"status": "active",
"assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unread_count": 123,
"last_message": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"direction": "inbound",
"content": "<string>",
"timestamp": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"gluu": {
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contact_name": "<string>",
"phone_number": "<string>",
"business_scoped_user_id": "<string>",
"parent_business_scoped_user_id": "<string>",
"username": "<string>"
}
],
"paging": {
"next": "<string>"
}
}{
"code": "unauthorized",
"message": "La clave de API no existe o fue revocada.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "invalid_cursor",
"message": "El cursor de `after` no es válido. Usa el `paging.next` de la página anterior.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "rate_limited",
"message": "Superaste el límite de 120 llamadas por minuto con esta clave.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}Conversaciones
Listar conversaciones
Las conversaciones de WhatsApp del workspace, de la de actividad más reciente a la más vieja. Cada una trae la identidad del contacto, lo que no leíste, a quién está asignada y un resumen del último mensaje.
GET
/
conversations
Listar conversaciones
curl --request GET \
--url https://api.wegluu.com/v1/conversations \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wegluu.com/v1/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wegluu.com/v1/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "whatsapp",
"status": "active",
"assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"unread_count": 123,
"last_message": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"direction": "inbound",
"content": "<string>",
"timestamp": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"gluu": {
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contact_name": "<string>",
"phone_number": "<string>",
"business_scoped_user_id": "<string>",
"parent_business_scoped_user_id": "<string>",
"username": "<string>"
}
],
"paging": {
"next": "<string>"
}
}{
"code": "unauthorized",
"message": "La clave de API no existe o fue revocada.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "invalid_cursor",
"message": "El cursor de `after` no es válido. Usa el `paging.next` de la página anterior.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "rate_limited",
"message": "Superaste el límite de 120 llamadas por minuto con esta clave.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}