Sending Messages with Third-Party Services

Go applications on App Engine can use third-party companies to send email, SMS messages, or make and receive phone calls. For example, you might send email to confirm business transactions, confirm the creation of user accounts, or send marketing communications.

This page lists some examples of companies that provide communication services and client libraries for Go applications on App Engine.

Mailgun

Mailgun provides both RESTful APIs and client libraries for sending email. As a GCP project user, your first 30,000 messages are free every month. See the monthly pricing calculator on the sign up page for pricing on additional messages and volume discounts.

Learn more about Mailgun:

Mailjet

Mailjet is a global email service that offers App Engine users a free tier with 25,000 emails each month. To take advantage of this offer, click the following link to Create a Mailjet account.

Learn more about Mailjet:

SendGrid

You can use SendGrid to power your emails on App Engine. SendGrid can improve your deliverability and provide transparency into what actually happens to those emails your app sends. You can see statistics on opens, clicks, unsubscribes, spam reports and more with the SendGrid interface or its API.

App Engine customers can send 12,000 emails every month for free by signing up for the SendGrid Email API plan through the Google Cloud Platform Console. Note that Google is compensated for customers who sign up for a paid account.

Learn more about SendGrid:

SMS and Voice Services via Twilio

You can use Twilio to embed voice, VoIP, and messaging into applications. The Twilio platform consists of the Twilio Markup Language (TwiML), a RESTful API, and VoIP SDKs for web browsers, Android, and iOS.

Google App Engine customers receive complimentary credit for SMS messages or inbound minutes when you upgrade.

Learn more about Twilio:

Adding client libraries and third-party API keys to your app

To add client libraries to your App Engine development and deployment environments, use the go get command to download the libraries into your GOPATH.

Most third party services use API keys to authenticate your app. You generate the keys on the third-party's site. To use those keys in your app, we recommend you do the following:

  1. Add the key to the environment variables section in your app's app.yaml file.

    For example:

     env_variables:
         EMAIL_API_KEY: key-from-third-party
    
  2. In your app's code, retrieve the key from your environment variables. For example:

  3. Pass the key as required by the third party's API.

หน้านี้มีประโยชน์ไหม โปรดแสดงความคิดเห็น

ส่งความคิดเห็นเกี่ยวกับ...