import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const response = await client.users.count({
organizationId: '123e4567-e89b-12d3-a456-426614174001',
websiteId: '123e4567-e89b-12d3-a456-426614174000',
});
console.log(response.totalCount);
{
"totalCount": 123
}
This endpoint returns the total user count
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const response = await client.users.count({
organizationId: '123e4567-e89b-12d3-a456-426614174001',
websiteId: '123e4567-e89b-12d3-a456-426614174000',
});
console.log(response.totalCount);
{
"totalCount": 123
}
The ID of the website
"123e4567-e89b-12d3-a456-426614174000"
The ID of the organization
"123e4567-e89b-12d3-a456-426614174001"
200
Schema for counting users response
Was this page helpful?