Skip to content

How to use Mail API courier with sendgrid #3394

Answered by a-damian
a-damian asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @vinckr
Thanks for the response, you were right, the config in place was configured correctly, I was getting 400 or 401 status codes from SendGrid since I was using the default body jsonnet, to solve the issue I adjusted the jsonnet file to match SendGrid specifications.
Here is the SendGrid API V3 docs in case some one need them. docs

Finally here is an example of how my config ended:

courier:
  delivery_strategy: http
  http:
    request_config:
      url: https://api.sendgrid.com/v3/mail/send
      method: POST
      body: base64://BASE_64_JSONNET_PERSONALIZED_TO_MATCH_SENDGRID_BODY
      headers:
        'Content-Type': 'application/json'
      auth:
        type: api_key
        

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@a-damian
Comment options

Answer selected by a-damian
@vinckr
Comment options

@nihalgurjar47
Comment options

@a-damian
Comment options

@nihalgurjar47
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants