Welcome to our Twilio FCM migration guide! As technology evolves, so do the tools that power our applications. In June 2024, Google is bidding farewell to the legacy FCM APIs in favor of the more advanced FCM HTTP v1 API. This transition will affect all Twilio products that utilize push notifications*. In this guide, you will find the steps to ensure your application does not lose any push functionality as a result of this change.
*Note: this does not affect existing customers on Twilio Frontline
Step-by-Step Process
Step 1: Create a Custom Role for FCM in Google Cloud Console
Navigate to the Google Cloud Console, where we'll create a custom role tailored for Firebase Cloud Messaging (FCM).
- Go to the IAM & Admin section.
- Create a custom role for FCM.
- Add only the "cloudmessaging.messages.create" permission to the role. This is the only role we need.
Step 2: Create a New GCP Service Account
Move on to the Service Accounts section in the Google Cloud Console to set up a dedicated service account.
- Create a new GCP service account.
- Specify only the custom role created in Step 1 for this service account.
Step 3: Generate a Private Key for the Service Account
Generate a private key for the service account, ensuring secure and authorized access.
- Navigate to Service Account Credentials in the Google Cloud Console.
- Create a new private key for the service account.
- Download the private key JSON file to your computer.
Step 4: Configure Your Twilio Credential Using the FCM Private Key
Now, let's seamlessly integrate your FCM credentials using either the Twilio Console or REST API.
- Utilize the Twilio Console or REST API.
- Use the private key JSON file downloaded in Step 3 for FCM configuration.
- Click "Create" to finish creating your new FCM HTTP v1 compliant credential
Now that you have your new credential, you can immediately start using it for sending Push notifications. Depending on the Twilio product you are using, you will have unique steps to utilize this new credential in place of the old one.
Note: As a result of this migration, the format of Notification Payloads will be changing. This only affects customers who are utilizing the payload override functionality of Twilio Notify. Please find the updated payload format here: https://firebase.google.com/docs/cloud-messaging/migrate-v1