title: FirebaseAdmin messaging returning 404 not found
body: <p>I am writing an API that sends an firebase message (using the official FirebaseAdmin library) when requested to a android device. I got it working perfect in normal C#, but in ASP.NET core <strong>I always get a 404 not found exception.</strong></p>
  
  <pre><code>Response status code does not indicate success: 404 (NotFound)
  {
    "error": {
      "code": 404,
      "message": "Requested entity was not found.",
      "errors": [
        {
          "message": "Requested entity was not found.",
          "domain": "global",
          "reason": "notFound"
        }
      ],
      "status": "NOT_FOUND"
    }
  }
  </code></pre>
  
  <p>I run the following code at startup:</p>
  
  <pre><code>if (FirebaseApp.DefaultInstance == null)
  {
      FirebaseApp.Create(new AppOptions
      {
          Credential = GoogleCredential.FromFile($@"{env.WebRootPath}\app-5a821-firebase-adminsdk-pf36f-6f44114d87.json")
      });
  }
  </code></pre>
  
  <p>And this is the request that I made, very simple:</p>
  
  <pre><code>[HttpGet]
  public async Task&lt;ActionResult&lt;IEnumerable&lt;string&gt;&gt;&gt; Get()
  {
      var message = new Message
      {
          Token = "dgY8UMXhEZ4:APA91bFnrZTGJKkCCBJHzbghvsvEaq-w-ee1XBAVqAaS-rsmR3Ald23rHGgpfdgVb09r97jDQBVSc6GtDHWtLHWAnn4Lm3EM_j-sh7cu-RaRSrfnk3X124v4co3Q9ID6TxFdGgv7OXWt",
          Data = new Dictionary&lt;string, string&gt;
          {
              {"title", "test" }
          }
       };
       try
       {
          var fcmResult = await FirebaseMessaging.DefaultInstance.SendAsync(message);
       } catch (FirebaseException ex)
       {
  
       } 
  
       return new string[] { "value1", "value2" };
   }
  </code></pre>
  
  <p>Github test project: <a href="https://github.com/kevingoos/FirebaseAdminTest" rel="nofollow noreferrer">https://github.com/kevingoos/FirebaseAdminTest</a></p>