Describe the bug
When using the createHistoryModule to fetch call history with a user-authenticated OAuth token, the API returns all calls from the entire organization instead of only the calls where the authenticated user was involved.
To Reproduce
const client = sipgateIO({ token: access_token });
const webuserId = await client.getAuthenticatedWebuserId(); // Returns "w0"
const historyModule = createHistoryModule(client);
const calls = await historyModule.fetchAll({
types: ['CALL'],
startDate: new Date('2024-12-23'),
endDate: new Date('2024-12-23')
});
// Returns ALL calls from the organization, including:
// - Calls from colleagues
// - Calls the authenticated user was NOT involved in
Expected behavior
When authenticated as a user, the history should only return events where that user was involved (incoming calls they answered, outgoing calls they made). If returning all organization events is intentional, there should be a userId or webuserId filter option
Describe the bug
When using the createHistoryModule to fetch call history with a user-authenticated OAuth token, the API returns all calls from the entire organization instead of only the calls where the authenticated user was involved.
To Reproduce
Expected behavior
When authenticated as a user, the history should only return events where that user was involved (incoming calls they answered, outgoing calls they made). If returning all organization events is intentional, there should be a userId or webuserId filter option