Error of: Unauthorized

0

I downloaded a project to test push notification. I'm trying in many ways and without success. This project is from a guy named HabibAli . When Squeeze gives the error of

  

Unauthorized

This is the program code for sending notifications

using System.Threading.Tasks;
using FirebaseNet.Messaging;
using System;

namespace MessageSender
{
    class MessageSender
    {



        static void Main(string[] args)
        {
            Task t = new Task(async () =>
            {
                await foo();
            });
            t.Start();


            Console.ReadLine();
        }

        public static async Task<IFCMResponse> foo()
        {
            FCMClient client = new FCMClient("AIzaSyAmf6JBNd2f0n4De-1DdPJdJiWfDbGhDVI"); //as derived from https://console.firebase.google.com/project/
            var message = new Message()
            {
                To = "778532852741", //topic example /topics/all
                Notification = new AndroidNotification()
                {
                    Body = "great match!",
                    Title = "Portugal vs. Denmark",
                }
            };
            var result = await client.SendMessageAsync(message);
            return result;
        }
    }
}

The FCM program is running on my Cel (I rode this morning) and also I can not anymore. As it was deployed the first time, it is working, but I can not run it any more, I even opened a post for it.

    
asked by anonymous 26.09.2017 / 12:49

0 answers