Reputation: 2534
When trying to retrieve suppression or bounces using SendGrid API 3, I get no results.
[]
I am only interested in downloading all global bounces or unsubscribes.
string queryParamsBounce = @"{
'end_time': 1,
'start_time': 1
}";
var responseBounce = await client.RequestAsync(method: BaseClient.Method.GET, urlPath: "suppression/bounces", queryParams: queryParamsBounce);
Console.WriteLine(responseBounce.StatusCode);
Console.WriteLine(responseBounce.Body.ReadAsStringAsync().Result);
Console.WriteLine(responseBounce.Headers.ToString());
Upvotes: 0
Views: 892
Reputation: 11
Just delete the queryParams from the api request as below:
var response = await client.RequestAsync(method: SendGridClient.Method.GET, urlPath: "suppression/blocks");
Or change the endtime parameter to a time in future. e.g. 'end_time':2212920280
Upvotes: 1