alle Empfänger auf einer Liste abrufen: -
`var request = sg.emptyRequest()
request.queryParams["page"] = '1'
request.queryParams["page_size"] = '1'
request.queryParams["list_id"] = '1'
request.method = 'GET'
request.path = '/v3/contactdb/lists/{list_id}/recipients'
sg.API(request, function (error, response) {
console.log(response.statusCode)
console.log(response.body)
console.log(response.headers)
});`
hier ist meine Api Reaktion: -Gesamteinzelteile erhalten nicht Antwort in sendgrid NodeJS Api
`{
"statusCode": 200,
"body": {
"recipients": [
{
"created_at": 1486990474,
"email": "[email protected]",
"first_name": null,
"id": "am9uZXMyQGV4YW1wbGUuY29t",
"last_clicked": null,
"last_emailed": null,
"last_name": "tyutyut",
"last_opened": null,
"updated_at": 1486990474
}
]
},
"headers": {
"server": "nginx",
"date": "Mon, 20 Feb 2017 07:11:31 GMT",
"content-type": "application/json",
"content-length": "1052",
"connection": "close",
"access-control-allow-methods": "HEAD, GET, PUT, POST, DELETE,OPTIONS,PATCH",
"access-control-max-age": "21600",
"access-control-expose-headers": "Link",
"access-control-allow-origin": "*",
"x-content-type-options": "nosniff",
"strict-transport-security": "max-age=31536000",
"x-ratelimit-remaining": "0",
"x-ratelimit-limit": "1",
"x-ratelimit-reset": "1487574692",
"powered-by": "Mako"
}
}`
i Listen reciepents Liste anzurufenden Ich würde. Paginierung funktioniert in diesem Api, aber ich bekomme nicht insgesamt Artikel params als Antwort.
Ich habe die API durchlaufen, aber keine vollständigen Artikel gefunden. Welche Antwort erhalten Sie von diesem API-Aufruf? – Sravan
siehe Antwort in meiner Frage –
seit Sie nicht die Gesamtzahl der Elemente erhalten haben, können Sie es manuell von Ihnen selbst zählen mit, "response.body.recipients.length" gibt Ihnen insgesamt – Sravan