import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});
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: process.env['X_API_KEY'], // This is the default and can be omitted
});
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
Total count of users
Was this page helpful?