Sending Messages with Third-Party Services Stay organized with collections Save and categorize content based on your preferences.
Python 2 applications on App Engine can use third-party companies tosend email, SMS messages, or make and receive phone calls. For example, youmight send email to confirm business transactions, confirm the creation of useraccounts, or send marketing communications.
This page lists some examples of companies that provide communication servicesand client libraries for Python 2 applications on App Engine.
Note: The services offered by these third-party companies are not covered bytheApp Engine Service Level Agreement.Mailgun
Mailgun providesboth RESTful APIs and client libraries for sending email, along with a freequota for all users. See the monthly pricing calculator onthe sign up page for pricing on additional messages and volume discounts.
Learn more about Mailgun:
Mailjet
Mailjet is a global email service that offers a free quota for App Engine users.To take advantage of this offer, click the following link toCreate a Mailjet account.
Learn more about Mailjet:
SendGrid
You can useSendGrid to power your emails on App Engine. SendGrid can improve yourdeliverability and provide transparency into what actually happens to thoseemails 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 take advantage of a free quota by signing upfor theSendGrid Email API plan through the Google Cloud console. Note thatGoogle 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. TheTwilio platform consists of theTwilio Markup Language (TwiML),aRESTful API,and VoIP SDKs for web browsers, Android, and iOS.
Learn more about Twilio:
Adding client libraries and third-party API keys to your app
To make client libraries available in your App Engine developmentand deployment environments,specify the library as a dependency.
Most third party services use API keys to authenticate your app. You generatethe keys on the third-party's site. To use those keys in your app, we recommendyou do the following:
Add the key tothe environment variables section in your app's
app.yamlfile.For example:
env_variables:EMAIL_API_KEY:key-from-third-partyIn your app's code, retrieve the key from your environment variables.For example:
EMAIL_API_KEY=os.environ['EMAIL_API_KEY']Pass the key as required by the third party's API.
Note thatanyone with access to yourapp.yaml will also have access to yourAPI keys. If you can't storeapp.yaml in a secure location, we recommend youstore the API keys in a secure location such asFirestore in Datastore mode (Datastore) and retrievethe keys at runtime, or keep the keys in your code but encrypt them with akeystore, such as Cloud Key Management Service. To learn about the advantages of eachapproach, seeChoosing a secret managementsolution.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.