postmansendgridsendgrid-api-v3

Connecting to SendGrid API via Postman


I am trying to connect to the SendGrid API via Postman. I've got my API key sorted and imported the postman collection from SendGrid, and some of the endpoints are working fine. For example, I can retrieve the API keys, send emails out, and retrieve spam reports.

However, when I try to retrieve the log of a specific email sent from the messages endpoint, I get a 400 Bad Request. I can see that the message IDs within SendGrid are in two parts, but using either part/the combined ID does not return a different result.

One thing I have noticed, is that when I send requests to endpoints that work, the headers include the host attribute, but if I include that on the messages endpoint request, I get an "access forbidden" response - so I have been removing that from the headers to get the below result.

List of headers used and returned result from Messages endpoint

Any help would be much appreciated, thanks


Solution

  • Turns out that even though we pay for their Email Service, a further fee is required to access Email Activity through their API