17 lines
456 B
PowerShell
17 lines
456 B
PowerShell
function GetContactsFromListBrevo {
|
|
$headers = @{
|
|
"accept" = "application/json"
|
|
"api-key" = ""
|
|
}
|
|
|
|
$response = Invoke-WebRequest `
|
|
-Uri 'https://api.brevo.com/v3/contacts/lists/9/contacts?limit=50&offset=0&sort=desc' `
|
|
-Method GET `
|
|
-Headers $headers
|
|
|
|
return $response.Content | ConvertFrom-Json
|
|
}
|
|
|
|
$contacts = GetContactsFromListBrevo
|
|
$contacts.count
|
|
$contacts.contacts | ForEach-Object { $_.email } |