Historial de una conversación
curl --request GET \
--url https://api.wegluu.com/v1/conversations/{id}/messages \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wegluu.com/v1/conversations/{id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wegluu.com/v1/conversations/{id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "whatsapp",
"platform_message_id": "<string>",
"timestamp": "1796396531",
"type": "text",
"direction": "inbound",
"status": "received",
"origin": "contact",
"context": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_message_id": "<string>"
},
"content": "<string>",
"media": {
"url": "<string>",
"filename": "<string>",
"content_type": "<string>",
"byte_size": 123
},
"transcript": {
"text": "<string>"
},
"gluu": {
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"from": "<string>",
"from_user_id": "<string>",
"from_parent_user_id": "<string>",
"to": "<string>",
"to_user_id": "<string>",
"to_parent_user_id": "<string>",
"username": "<string>",
"profile_name": "<string>",
"text": {
"body": "<string>"
},
"image": {
"caption": "<string>",
"mime_type": "<string>",
"filename": "<string>"
},
"video": {
"caption": "<string>",
"mime_type": "<string>",
"filename": "<string>"
},
"document": {
"caption": "<string>",
"mime_type": "<string>",
"filename": "<string>"
},
"audio": {
"mime_type": "<string>",
"voice": true
},
"sticker": {
"mime_type": "<string>"
},
"location": {
"latitude": 123,
"longitude": 123,
"name": "<string>",
"address": "<string>"
},
"contacts": [
{
"name": "<string>",
"phones": [
"<string>"
]
}
],
"reaction": {
"emoji": "<string>",
"message_id": "<string>"
},
"template": {
"name": "<string>",
"language": "<string>"
},
"interactive": {},
"statuses": [
{
"status": "sent",
"timestamp": "<string>"
}
],
"error": {
"code": "<string>",
"message": "<string>"
},
"sender": {
"type": "user",
"id": "<string>",
"name": "<string>"
}
}
],
"paging": {
"next": "<string>"
}
}{
"code": "unauthorized",
"message": "La clave de API no existe o fue revocada.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "conversation_not_found",
"message": "No hay una conversación con ese id en este workspace.",
"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
Historial de una conversación
Los mensajes de la conversación, del más nuevo al más viejo: entrantes y salientes de cualquier origen (el contacto, el inbox, la API, agentes, campañas, automatizaciones y la app de WhatsApp Business). Los mensajes programados desde Gluu aparecen cuando salen.
GET
/
conversations
/
{id}
/
messages
Historial de una conversación
curl --request GET \
--url https://api.wegluu.com/v1/conversations/{id}/messages \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wegluu.com/v1/conversations/{id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wegluu.com/v1/conversations/{id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "whatsapp",
"platform_message_id": "<string>",
"timestamp": "1796396531",
"type": "text",
"direction": "inbound",
"status": "received",
"origin": "contact",
"context": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform_message_id": "<string>"
},
"content": "<string>",
"media": {
"url": "<string>",
"filename": "<string>",
"content_type": "<string>",
"byte_size": 123
},
"transcript": {
"text": "<string>"
},
"gluu": {
"channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"from": "<string>",
"from_user_id": "<string>",
"from_parent_user_id": "<string>",
"to": "<string>",
"to_user_id": "<string>",
"to_parent_user_id": "<string>",
"username": "<string>",
"profile_name": "<string>",
"text": {
"body": "<string>"
},
"image": {
"caption": "<string>",
"mime_type": "<string>",
"filename": "<string>"
},
"video": {
"caption": "<string>",
"mime_type": "<string>",
"filename": "<string>"
},
"document": {
"caption": "<string>",
"mime_type": "<string>",
"filename": "<string>"
},
"audio": {
"mime_type": "<string>",
"voice": true
},
"sticker": {
"mime_type": "<string>"
},
"location": {
"latitude": 123,
"longitude": 123,
"name": "<string>",
"address": "<string>"
},
"contacts": [
{
"name": "<string>",
"phones": [
"<string>"
]
}
],
"reaction": {
"emoji": "<string>",
"message_id": "<string>"
},
"template": {
"name": "<string>",
"language": "<string>"
},
"interactive": {},
"statuses": [
{
"status": "sent",
"timestamp": "<string>"
}
],
"error": {
"code": "<string>",
"message": "<string>"
},
"sender": {
"type": "user",
"id": "<string>",
"name": "<string>"
}
}
],
"paging": {
"next": "<string>"
}
}{
"code": "unauthorized",
"message": "La clave de API no existe o fue revocada.",
"request_id": "0193a1c9-51de-7d02-8a44-6f0e2b7c9d31"
}{
"code": "conversation_not_found",
"message": "No hay una conversación con ese id en este workspace.",
"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"
}