Recuperar contenido de Slack

Recuperar el contenido de Slack

Retrieve the contents of a discussion by ID. A discussion can be a Slack or Discord chat.

get

Returns the content of the discussion with the specified ID. A discussion can be a Slack or Discord chat. The response contains two fields: discussion_content, which includes the main messages of the chat, and thread_contents, which contains the threads of the discussion.

Path parameters
discussion_idintegerRequired

The ID of the discussion to retrieve contents for. Discussions are either Slack or Discord chats.

Query parameters
integration_typestringRequired

Indicate the integration of the discussion. Currently, it can only be "slack" or "discord".

fromstringOptional

Indicate the starting time when we want to retrieve the content of the discussion in ISO 8601 format at GMT+0. If not specified, the default time is now.

tostringOptional

Indicate the ending time when we want to retrieve the content of the discussion in ISO 8601 format at GMT+0. If not specified, it is 7 days before the "from" parameter.

Responses
200

Main and threaded messages of the discussion in a time range.

application/json
get
/discussions/{discussion_id}/contents/

Ejemplos de Solicitudes

Reemplace YOUR_JWT_TOKEN con su token JWT real y 12345 con un ID de discusión real.

Obtener contenidos de Slack de la última semana

to_date = datetime.now().isoformat() + "Z" from_date = (datetime.now() - timedelta(days=7)).isoformat() + "Z"

get_slack_contents(12345, from_date, to_date)

Respuestas de Error

Código de Estado
Descripción

404

Discusión no encontrada

500

Error interno del servidor

Este endpoint recupera el contenido de un canal de Slack o de una conversación de mensaje directo. Devuelve tanto los mensajes principales del canal (discussion_content) como las respuestas en hilo (thread_contents). Los datos están organizados cronológicamente e incluyen información del usuario, lo que facilita la comprensión del contexto de las conversaciones.

Los parámetros de rango de tiempo te permiten centrarte en períodos específicos, lo que es particularmente útil para revisar la actividad reciente o discusiones históricas.

Last updated