0

I'm converting my GCM app to FCM using this guide. My server code is written in C# running on an ASP.NET Web REST Service. Existing code that does the post is as follows . . .

    HttpWebRequest Request = (HttpWebRequest)WebRequest.Create("https://android.googleapis.com/gcm/send");
    Request.Method = "POST";
    Request.KeepAlive = false;
    Request.ContentType = "application/json";
    Request.Headers.Add(string.Format("Authorization: key={0}", apiKey));
    Request.ContentLength = byteArray.Length;
    Stream dataStream = Request.GetRequestStream();
    dataStream.Write(byteArray, 0, byteArray.Length);
    dataStream.Close();

In the "Update server endpoints" it says the old gcm endpoint of

gcm-http.googleapis.com/gcm/

should be converted to

fcm.googleapis.com/fcm/

However I have not been using that endpoint. I have been using

android.googleapis.com/gcm/send

very successfully for years. I don't remember why I have /send. Should I also append it to the new endpoint?

AL.
  • 36,815
  • 10
  • 142
  • 281
Dean Blakely
  • 3,535
  • 11
  • 51
  • 83

1 Answers1

0

The documentation seems to have the older version. android.googleapis.com/gcm/send was more recent than gcm-http.googleapis.com/gcm/ IIRC.

Either way, I would confirm that android.googleapis.com/gcm/send should be replaced with the fcm.googleapis.com/fcm/ endpoint. (here's an old answer of mine for reference).

AL.
  • 36,815
  • 10
  • 142
  • 281