Retrieve Slack's content
Example Requests
curl -X GET \
"https://api.rememberizer.ai/api/v1/discussions/12345/contents/?integration_type=slack&from=2023-06-01T00:00:00Z&to=2023-06-07T23:59:59Z" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"const getSlackContents = async (discussionId, from = null, to = null) => {
const url = new URL(`https://api.rememberizer.ai/api/v1/discussions/${discussionId}/contents/`);
url.searchParams.append('integration_type', 'slack');
if (from) {
url.searchParams.append('from', from);
}
if (to) {
url.searchParams.append('to', to);
}
const response = await fetch(url.toString(), {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_JWT_TOKEN'
}
});
const data = await response.json();
console.log(data);
};
// Get Slack contents for the past week
const toDate = new Date().toISOString();
const fromDate = new Date();
fromDate.setDate(fromDate.getDate() - 7);
const fromDateStr = fromDate.toISOString();
getSlackContents(12345, fromDateStr, toDate);Path Parameters
discussion_id
integer
Required. The ID of the Slack channel or discussion to retrieve contents for.
Query Parameters
integration_type
string
Required. Set to "slack" for retrieving Slack content.
from
string
Starting time in ISO 8601 format at GMT+0. If not specified, the default is now.
to
string
Ending time in ISO 8601 format at GMT+0. If not specified, it's 7 days before the "from" parameter.
Response Format
Error Responses
404
Discussion not found
500
Internal server error
This endpoint retrieves the contents of a Slack channel or direct message conversation. It returns both the main channel messages (discussion_content) and threaded replies (thread_contents). The data is organized chronologically and includes user information, making it easy to understand the context of conversations.
The time range parameters allow you to focus on specific periods, which is particularly useful for reviewing recent activity or historical discussions.
Last updated