• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
SendGridDelivered_API_Workshop
 

SendGridDelivered_API_Workshop

on

  • 399 views

Developer Evangelist Swift delivers great info, examples, and demos of SendGrid's API's

Developer Evangelist Swift delivers great info, examples, and demos of SendGrid's API's

Statistics

Views

Total Views
399
Views on SlideShare
399
Embed Views
0

Actions

Likes
1
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    SendGridDelivered_API_Workshop SendGridDelivered_API_Workshop Presentation Transcript

    • API  Workshop#delivered2012
    • Hi,  I’m  Swi3. @SwiftAlphaOne swift@sendgrid.com#delivered2012
    • What  is  SendGrid? • Cloud-­‐based  SMTP  provider • Massively  scalable • AnalyCcs  on  emails  you  send • Robust  APIS  for  developers  to  integrate#delivered2012
    • If  you  learn  1  thing... SendGrid  >  Email  Relay#delivered2012
    • APIs  Overview What  APIs  does  SendGrid  Offer? • SMTP  API • Subuser  API • Web  API • CredenCals  API • NewsleNer  API • Event  Webhook • Reseller  API • Inbound  Parse  Webhook API#delivered2012
    • APIs  Overview Q:  Why  should  I  care  about  the  SendGrid  APIs? A:  There  are  a  lot  of  reasons,  but  the  short  list  is... •  Reduce  code  complexity •  Deeper  analyCcs  &  tracking •  Less  resource  consumpCon •  BeNer  UX#delivered2012
    • What  I  got  out  of  lunch Time is valuable.Especially developer time.#delivered2012
    • SMTP  API Custom  SMTP  header  that  contains  instrucCons  on  how  to   process  your  email X-SMTPAPI: { ... } Add  extra  informaCon,  filters,  &  manipulaCons: •  Define  mulCple  recipients •  Text  SubsCtuCons •  Categories •  Unique  arguments  /  IdenCfiers#delivered2012
    • SMTP  API Example:  Billing  noCficaCon X-SMTPAPI: { "to": ["swift@sendgrid.com"], "category": "billing_notifications", "unique_args": { "user_id": "12345" }, "sub": { "%amount%": ["$9.95"] } }#delivered2012
    • SMTP  API Example:  Billing  noCficaCon  (cont)#delivered2012
    • Customer  Highlight qup.tv Queue,  rate,  or  watch  movies  on  Ne]lix  instant  with  one  click!#delivered2012
    • Web  API Send  mail  or  manipulate  SendGrid  se_ngs  via  HTTP Anything  (almost)  you  can  do  from  the  SendGrid   dashboard,  you  can  do  from  the  Web  API •  Edit  profile  /  account  informaCon •  Add  new  Incoming  Parse  endpoints •  Retrieve  stats •  Manage  lists  (Bounces,  Blocks,  Unsubscribes,  etc.) •  Add  /  Remove  filters  (apps)#delivered2012
    • Web  API Web  API  endpoints  have  the  following  format: https://sendgrid.com/api/<MODULE>.<ACTION>.<FORMAT> Example:  Send  Email  over  HTTP curl -X POST http://sendgrid.com/api/mail.send.json -d “to=john@example.com” -d “from=hello@myapp.com” -d “subject=hello world email” -d “text=some body text” -d “api_user=your_sendgrid_username” -d “api_key=your_sendgrid_key”#delivered2012
    • Web  API  vs.  SMTP  API Q:  Why  would  I  use  HTTP  instead  of  SMTP? (Don’t worry, this is a really common question) A:  Normally,  you  won’t  have  to.    Unless... •  Your  ISP  is  blocking  common  SMTP  ports •  There  is  high  latency  between  your  app  and  SendGrid •  Difficult  to  install  /  configure  SMTP  drivers •  Simplicity  for  developers#delivered2012
    • NewsleEer  API Access  the  SendGrid  newsleNer  app  via  the  API https://sendgrid.com/api/newsletter/<ACTION>.<FORMAT> You  can  create  &  manage... •  NewsleNer  content •  Recipient  lists •  Sender  idenCCes •  Scheduled  deliveries#delivered2012
    • Webhooks Q:  What  are  Webhooks? A:  Webhooks  are  like  inverse  API  calls;  you  tell  us   where  the  data  needs  to  go,  we  send  it  there. WEB HOOK#delivered2012
    • Event  No2fica2on  Webhook Receive notifications when SendGrid events happen POST •Processed •Opened •Dropped •Clicked Your  ApplicaCon  receives   •Delivered •Spam  Reported an  event  POST •Bounced •Unsubscribed (like  a  form  submit)#delivered2012
    • Event  No2fica2on  Webhook What does an event notification look like? { "email":"john@example.com", "timestamp": 1322000095, "unique_arg":"some argument", "event":"delivered" }#delivered2012
    • Event  No2fica2on  Webhook Q:  Why  would  I  want  to  use  the  event  webhook? A:  Use  it  to  enhance  your  exisCng  email   funcConality  and  gain  smart  customer  insight. (It’s a very reactive API)#delivered2012
    • Inbound  Parse  Webhook Lets you receive email in your application EMAIL POST 1. User sends email to *@yourapplication.com 2. SendGrid parses email & attachments 3. SendGrid POSTs the email to your application#delivered2012
    • Customer  Highlight thebirdy.com Answer  one  email  a  day,  and  track  what  you  spend.  Create   categories  by  tagging  your  purchases  like  #twiNer.  Super  simple.#delivered2012
    • Inbound  Parse  Webhook 1. Configure your hostname and URL settings http://sendgrid.com/developer/reply 2. Point your domain’s MX records at SendGrid Type Value MX 0 mx.sendgrid.net 3. Return a 200 status code from your application#delivered2012
    • AddiGonal  APIs   Subuser  API •  Manage  and  control  subuser  accounts Reseller  API •  For  partners  who  want  to  integrate  their  pla]orm  with  SendGrid Mul2ple  Creden2als  API •  Add  new  API  keys  and  users  to  your  account#delivered2012
    • Demo Time! http://github.com/theycallmeswift#delivered2012
    • Questions?#delivered2012
    • Resources • DocumentaCon:  hNp://docs.sendgrid.com/ • Official  Libraries:  hNps://github.com/sendgrid/ • Support:  hNp://support.sendgrid.com/#delivered2012
    • Swi3. @SwiftAlphaOne swift@sendgrid.com#delivered2012