Skip to main content
Version: Latest

SDK Code Examples — WhatsAppTimelineController

Base URL: https://{tenant}.shumoul.app · Token variable: $TOKEN (bash) / %TOKEN% (cmd) / token (JS/C#/Dart), obtained per §19 SDK Usage Guide.


1. GET /api/v1/whatsapp/timeline/GetTimeline/{conversationId}

Permission: WhatsAppInbox.Timeline

cURL — Linux/macOS:

curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/timeline/GetTimeline/c1a2b3c4-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"

cURL — Windows (cmd.exe):

curl -X GET "https://{tenant}.shumoul.app/api/v1/whatsapp/timeline/GetTimeline/c1a2b3c4-0000-0000-0000-000000000001" ^
-H "Authorization: Bearer %TOKEN%" ^
-H "Content-Type: application/json"

JavaScript — fetch():

const response = await fetch("https://{tenant}.shumoul.app/api/v1/whatsapp/timeline/GetTimeline/c1a2b3c4-0000-0000-0000-000000000001", {
method: "GET",
headers: { "Authorization": `Bearer ${token}`, "Content-Type": "application/json" }
});
const result = await response.json();

JavaScript — Axios:

const { data } = await axios.get("https://{tenant}.shumoul.app/api/v1/whatsapp/timeline/GetTimeline/c1a2b3c4-0000-0000-0000-000000000001", { headers: { Authorization: `Bearer ${token}` } });

C# — HttpClient:

var client = httpClientFactory.CreateClient("Shumoul"); // BaseAddress = "https://{tenant}.shumoul.app"
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var response = await client.GetAsync("/api/v1/whatsapp/timeline/GetTimeline/c1a2b3c4-0000-0000-0000-000000000001");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<Result<object>>();

Flutter — Dio:

final response = await dio.get(
"/api/v1/whatsapp/timeline/GetTimeline/c1a2b3c4-0000-0000-0000-000000000001",
options: Options(headers: {"Authorization": "Bearer $token"}),
);