Go 1.11 はサポートが終了しており、2026 年 1 月 31 日に
非推奨になります。非推奨になると、過去に組織のポリシーを使用して以前のランタイムのデプロイを再度有効にしていた場合でも、Go 1.11 アプリケーションをデプロイできなくなります。既存の Go 1.11 アプリケーションは、
非推奨日以降も引き続き実行され、トラフィックを受信します。
サポートされている最新バージョンの Go に移行することをおすすめします。
サードパーティのサービスによるメッセージの送信
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
App Engine アプリでは、サードパーティ企業のサービスを利用して、メールや SMS メッセージの送信、電話の発着信を行えます。たとえば、ビジネス トランザクションやユーザー アカウントの作成を確認するためのメールの送信や、マーケティング関連のメール配信を行うことができます。
このページでは、App Engine アプリで使用できる通信サービスとクライアント ライブラリを提供している企業の例を紹介します。
Mailgun
Mailgun は、メール送信用の RESTful API とクライアント ライブラリの両方を、すべてのユーザーへの無料割り当てとともに提供しています。追加のメッセージに対する料金設定やボリューム ディスカウントについては、お申し込みページの月額料金計算ツールでご確認ください。
Mailgun の詳細については次をご覧ください。
Mailjet
Mailjet は、App Engine ユーザーに無料枠を提供するグローバル メールサービスです。この特典を利用するには、次のリンクをクリックして Mailjet アカウントを作成してください。
Mailjet の詳細については次をご覧ください。
SendGrid
SendGrid は App Engine のメール機能を強化します。SendGrid を使用すると、メールの到達率が向上し、アプリから送信されたメールの状況をより明確に把握できます。SendGrid のインターフェースまたは API を介して、開封数、クリック数、登録解除、スパムレポートなどに関する統計情報を確認できます。
App Engine をご利用の場合は、 Google Cloud コンソールから SendGrid Email API プランを申し込むと、無料割り当てをご利用いただけます。お客様が有料パッケージを申し込むと Google に報酬が支払われます。
SendGrid の詳細については次をご覧ください。
Twilio を介した SMS サービスと音声サービス
Twilio を使用すると、音声、VoIP、メッセージをアプリケーションに埋め込むことができます。Twilio プラットフォームは、Twilio マークアップ言語(TwiML)、RESTful API、VoIP SDK(ウェブブラウザ、Android、iOS 用)で構成されています。
Twilio の詳細については次をご覧ください。
クライアント ライブラリとサードパーティ API キーをアプリに追加する
クライアント ライブラリを App Engine 開発環境とデプロイ環境で使用できるようにするには、ライブラリを依存関係として指定します。たとえば、Node.js ランタイムの依存関係を指定するには、こちらをご覧ください。
サードパーティのほとんどのサービスでは API キーを使用してアプリの認証を行います。鍵は、サードパーティのサイトで生成します。アプリでサードパーティの API キーを使用するには、次のようにします。
API キーを Secret Manager に保存し、インスタンスの起動時に鍵を安全に取得します。
Cloud Key Management Service で鍵を暗号化し、暗号化された鍵を環境変数に保存して、インスタンスの起動時にプログラムで復号します。
非本番環境では、鍵自体を環境変数に保存してかまいません。app.yaml
ファイルにアクセスできるユーザーは、自分の鍵にもアクセスできることに注意してください。
各方法の利点については、シークレット管理ソリューションの選択をご覧ください。
鍵または暗号化された鍵の値を環境変数に保存するには、次のようにします。
鍵または暗号化された鍵の値を、アプリの app.yaml
ファイル内の環境変数セクションに追加します。
次に例を示します。
env_variables:
EMAIL_API_KEY: key-from-third-party OR encrypted-key
Node.js ランタイムを使用している場合は、アプリの app.standard.yaml
ファイルで、アプリの環境変数セクションの構成変数にキーを追加します。
アプリのコードで、環境変数から鍵または暗号化された鍵を取得します。
たとえば、Python ランタイムを使用している場合は、次のようにします。
EMAIL_API_KEY = os.environ['EMAIL_API_KEY']
サードパーティの API の要求に応じて鍵を渡します。以前に暗号化した鍵は、確実に復号してください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-04 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eApp Engine applications can integrate with third-party services for email, SMS, and voice communication, allowing functions such as transaction confirmations and marketing communications.\u003c/p\u003e\n"],["\u003cp\u003eMailgun, Mailjet, and SendGrid are third-party services that offer email solutions for App Engine, each with free quotas and RESTful APIs or client libraries.\u003c/p\u003e\n"],["\u003cp\u003eTwilio offers SMS and voice services, with its platform consisting of TwiML, a RESTful API, and VoIP SDKs, for integration into App Engine applications.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries for third-party services can be made available in App Engine by specifying them as dependencies, and API keys for authentication can be stored securely using Secret Manager or Cloud Key Management Service.\u003c/p\u003e\n"],["\u003cp\u003eThird party companies who's services are offered are not covered by the App Engine service level agreement.\u003c/p\u003e\n"]]],[],null,["# Sending Messages with Third-Party Services\n\nApp Engine apps can use third-party companies to send email, SMS messages,\nor make and receive phone calls. For example, you might send email to confirm\nbusiness transactions, confirm the creation of user accounts, or send marketing\ncommunications.\n\nThis page lists some examples of companies that provide communication services\nand client libraries for App Engine apps.\n| **Note:** The services offered by these third-party companies are not covered by the [App Engine Service Level Agreement](/appengine/sla).\n\nMailgun\n-------\n\n[Mailgun](https://www.mailgun.com/) provides\nboth RESTful APIs and client libraries for sending email, along with a free\nquota for all users. See the monthly pricing calculator on\n[the sign up page](http://www.mailgun.com/google)\nfor pricing on additional messages and volume discounts.\n\nLearn more about Mailgun:\n\n- [Mailgun developer documentation](https://documentation.mailgun.com)\n- [Mailgun client libraries](https://documentation.mailgun.com/en/latest/libraries.html#libraries)\n\nMailjet\n-------\n\n[Mailjet](https://www.mailjet.com/google/?p=google)\nis a global email service that offers a free quota for App Engine users.\nTo take advantage of this offer, click the following link to\n[Create a Mailjet account](https://www.mailjet.com/google/?p=google).\n\nLearn more about Mailjet:\n\n- [Mailjet developer documentation](https://dev.mailjet.com/email/guides/getting-started/)\n- [Mailjet client libraries](https://dev.mailjet.com/email/guides/libraries/)\n\nSendGrid\n--------\n\nYou can use [SendGrid](https://sendgrid.com/)\nto power your emails on App Engine. SendGrid can improve your\ndeliverability and provide transparency into what actually happens to those\nemails your app sends. You can see statistics on opens, clicks, unsubscribes,\nspam reports and more with the SendGrid interface or its API.\n\nApp Engine customers can take advantage of a free quota by signing up\nfor the [SendGrid Email API plan](https://console.cloud.google.com/launcher/details/sendgrid-app/sendgrid-email) through the Google Cloud console. Note that\nGoogle is compensated for customers who sign up for a paid account.\n\nLearn more about SendGrid:\n\n- [SendGrid developer documentation](https://sendgrid.com/docs/for-developers/)\n- [SendGrid client libraries](https://sendgrid.com/docs/Integrate/libraries.html)\n\nSMS and Voice Services via Twilio\n---------------------------------\n\nYou can use Twilio to embed voice, VoIP, and messaging into applications. The\nTwilio platform consists of the [Twilio Markup Language (TwiML)](http://www.twilio.com/docs/api/twiml),\na [RESTful API](http://www.twilio.com/docs/api/rest),\nand VoIP SDKs for web browsers, Android, and iOS.\n\nLearn more about Twilio:\n\n- [Twilio developer documentation](https://www.twilio.com/docs/)\n- [Twilio client libraries](http://www.twilio.com/docs/libraries)\n\nAdding client libraries and third-party API keys to your app\n------------------------------------------------------------\n\nTo make client libraries available in your App Engine development\nand deployment environments, specify the library as a dependency.\nFor example, to specify dependencies for the Node.js runtime,\nsee [here](/appengine/docs/standard/nodejs/specifying-dependencies).\n\nMost third party services use API keys to authenticate your app. You generate\nthe keys on the third-party's site. To use the third-party API keys in your app:\n\n1. Store the API keys in the [Secret Manager](/secret-manager/docs/overview) and\n [fetch the key securely](/secret-manager/docs/create-secret-quickstart) at\n instance start time.\n\n2. Encrypt the key with [Cloud Key Management Service](/kms/docs/key-management-service), store\n the encrypted key in an environment variable, and\n [decrypt it programmatically](/kms/docs/encrypt-decrypt) at instance start time.\n\n3. For non-production environments, you can store the key itself in an\n environment variable. Note that anyone with access to your `app.yaml` file\n can also access your key.\n\nTo learn about the advantages of each\napproach, see [Choosing a secret management\nsolution](/kms/docs/secret-management#choosing_a_secret_management_solution)\n\nTo store the key, or encrypted key value in an environment variable:\n\n1. Add the key or encrypted key value to the environment variables section in\n your app's `app.yaml` file.\n\n For example: \n\n env_variables:\n EMAIL_API_KEY: key-from-third-party OR encrypted-key\n\n\n If you are using the Node.js runtime, add the key to the configuration variables in your app's environment variables section in your app's `app.standard.yaml` file.\n2. In your app's code, retrieve the key or encrypted key from your environment\n variables.\n\n For example, if you are using the Python runtime: \n\n EMAIL_API_KEY = os.environ['EMAIL_API_KEY']\n\n3. Pass the key as required by the third party's API. Ensure you\n [decrypt the key](/kms/docs/encrypt-decrypt) if you encrypted it previously."]]