Use this method to count number of contacts in group (either dynamic or static). When using this method for getting dynamic group count you may get response with Retry-After header. Please check chapter 'Long running actions - Retry-After header explained'.
Authorizations
Path parameters
groupIdintrequired
The id of the group.
Responses
application/json
objectoptional
application/json
application/json
application/json
application/json
get
using System.Threading.Tasks;
internal class Program
{
private static void Main(string[] args)
{
string requestBody = "";
try {
using var client = new HttpClient{};
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.messageflow.com/v2.1/group/{groupId}/count");
request.Headers.Add("Authorization", "YourAuthorizationKey");
request.Headers.Add("Application-Key", "YourApplicationKey");
request.Content = new StringContent(requestBody, null, "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
} catch (HttpRequestException e) {
Console.WriteLine("\n Exception Caught!\n Message :{0} ", e.Message);
}
}
}