<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Danusha Hewagama on Medium]]></title>
        <description><![CDATA[Stories by Danusha Hewagama on Medium]]></description>
        <link>https://medium.com/@danusha.99h?source=rss-bbdf6d4d8050------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*B3OO594DhreTAB02</url>
            <title>Stories by Danusha Hewagama on Medium</title>
            <link>https://medium.com/@danusha.99h?source=rss-bbdf6d4d8050------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:19:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danusha.99h/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What if you have to maintain more than 50 apps for push notifications?]]></title>
            <link>https://medium.com/@danusha.99h/what-if-you-have-to-maintain-more-than-50-apps-for-push-notifications-56fff25c1fb3?source=rss-bbdf6d4d8050------2</link>
            <guid isPermaLink="false">https://medium.com/p/56fff25c1fb3</guid>
            <category><![CDATA[gcp-iam]]></category>
            <category><![CDATA[fcm-push-notification]]></category>
            <category><![CDATA[gcp-service-account]]></category>
            <category><![CDATA[firebasecloudmessaging]]></category>
            <category><![CDATA[apple-push-notifications]]></category>
            <dc:creator><![CDATA[Danusha Hewagama]]></dc:creator>
            <pubDate>Sat, 22 Aug 2026 05:15:12 GMT</pubDate>
            <atom:updated>2026-08-24T19:48:40.003Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine you built a great app. Now, 100 different companies want to buy a branded version of it. That is amazing!</p><p>But soon, your tech team hits a wall. “Firebase won’t let us add more apps!” they say.</p><p>This is a very common problem when you scale white-label apps. One Firebase project can only hold about 50 apps. If you try to force them all into one big bucket, everything gets messy. Your data is mixed, and your messages start to fail. Firebase stops you.</p><p>Consolidating (putting apps together) is okay if you can, but this article is for when you cannot. You can find more about the limits <a href="https://firebase.google.com/support/faq/#apps-per-project">here</a>.</p><p>So how do you send notifications to 100 different client apps without creating 100 different backends?</p><h3>The Master Key Solution</h3><p>First, let’s clear up a common misconception: <strong>you do not need 1 Firebase project per client.</strong></p><p>One client equals <strong>1 app</strong> inside a project. Because a single Firebase project holds up to 50 apps, you can easily group 50 different clients into Project #1. You only create Project #2 when you onboard client #51.</p><p>This means if you have 100 clients, you only need <strong>2 Firebase projects</strong> — not 100!</p><pre>[Firebase Project #1]  ──►  Holds Client Apps #1 to #50<br>[Firebase Project #2]  ──►  Holds Client Apps #51 to #100</pre><p>The secret is to give <strong>one shared backend system</strong> permission to deliver notifications across all of your projects seamlessly.</p><p>Think of it like a master key system:</p><ul><li>Each <strong>Firebase project</strong> is a secure building holding up to 50 client apps.</li><li>To deliver a notification inside <em>any</em> building, your single backend needs a master key that opens all doors.</li></ul><p>We use <strong>Google IAM (Identity and Access Management)</strong> to create this master key:</p><ul><li>Create one <strong>“Master Backend” service account email</strong> in your main infrastructure project.</li><li>Go into every additional Firebase project you create (Project #2, Project #3, etc.) and add that same service account email under <strong>IAM &amp; Admin</strong>.</li><li>Grant it the <strong>Firebase Cloud Messaging Admin</strong> role on each project.</li></ul><p>Now, your single backend holds a master key that can deliver push notifications to all 100 client apps across all your projects without needing extra backends or complex credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udQZi5_ZeseCQwJR9n0zwg.jpeg" /></figure><h3>Address vs. Identity</h3><p>Having the master key gives you access, but you still need the exact destination address.</p><p>An FCM device token (a user’s unique device address) is permanently locked to the specific Firebase project that created it. If you try to send a push notification using token $A$ through project $B$, delivery will silently fail.</p><p>To route messages successfully, your backend must know two things for every user:</p><ol><li>The <strong>FCM Token</strong> (the device address).</li><li>The <strong>Project ID</strong> (the project that owns that token).</li></ol><h3>How It Works: Simple Data Flow</h3><p>To handle cross-project delivery smoothly, use a simple two-step workflow:</p><ol><li><strong>REGISTER:</strong> When a user opens their branded app, the mobile app sends its FCM token AND its local projectId to your backend. Your database saves both values in the same record.</li><li><strong>SEND:</strong> When you send a push message, your backend loads the saved projectId. It uses its Master Key permission to call the FCM endpoint for that specific project ([https://fcm.googleapis.com/v1/projects/](https://fcm.googleapis.com/v1/projects/){projectId}/messages:send).</li></ol><p>Here is a simplified illustration of how that data flows. Notice how the shared backend uses the “key permission” to route messages to the <em>correct, separate project box</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*USaMt7xCukId1JqtBfmWkw.jpeg" /></figure><p>This architecture lets you scale to hundreds of branded apps with ease. Whether you manage 2 Firebase projects or 20, your backend infrastructure stays lean and unified.</p><p>To keep your setup clean:</p><ul><li>Grant your Master Service Account “Firebase Cloud Messaging Admin” permissions whenever you create a new project.</li><li>Always store the projectId alongside the FCM device token during registration.</li><li>Never reuse Firebase configuration files across different branded apps.</li><li>Test push notification delivery on a physical device whenever you onboard a new client project.</li></ul><p>You don’t need a hundred backends to manage white-label push notifications. You just need one backend that knows how to route. The IAM permission gives you the access; the projectId gives you the address.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56fff25c1fb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>