I also have an Arduino project (ESP8266 based) that is also sending http (not https) posts to http://fcm.googleapis.com/fcm/send
. that has also stopped working.
I was able to confirm via Postman that requests sent to http://fcm.googleapis.com/fcm/send
fail with a 403 (Forbidden) response.
I was able to get something working again by adding a fingerprint to the call to the begin
method.
http.begin("https://fcm.googleapis.com/fcm/send", "F6:84:98:95:E5:6B:AC:EC:17:79:74:BF:1A:4B:E0:7E:FA:C8:EC:E9");
I was able to find the fingerprint using this site https://www.grc.com/fingerprints.htm
My actual app however is crashing with the the above update, so I still need to dig into this some more. I think there is a bug in the HttpClient that has already been fixed and I am just not picking it up.
Update
The issue with my full Arduino app crashing was due to the https request using too much memory (esp8266's don't have a lot of memory). I looked at a few options that could reduce the memory requirements, but ultimately I decided to go with a similar, but slightly different approach than what Solara07 posted.
Since I already had a raspberry pi running on my network I decided to use that as a proxy.
I installed trafficserver on the raspberry pi and added the following two lines to the /etc/trafficserver/remap.config
map http://192.168.86.77/fcm/send https://fcm.googleapis.com/fcm/send
reverse_map https://fcm.googleapis.com/fcm/send http://192.168.86.77/fcm/send
The required change to my arduino code was the following:
Change:
http_.begin("http://fcm.googleapis.com/fcm/send");
To:
http_.begin("192.168.86.77", 8080, "http://192.168.86.77/fcm/send");
where http_ is the instance of the HTTPClient
and 192.168.86.77
is the private internal address of my raspberry pi
More details and an answer to some problems I had implementing this can be found here.