I integrated firebase push in my application, and one thing I noticed is the LEGACY Cloud messaging has been disabled, and it's recommended to use the Firebase Cloud Messaging API V1.
The new FCM API v1 token is shorter than the older web API key (which is now disabled by default)
When using the new FCM token (format AIza............), I get this error
But when I went to Cloud Messaging API and enabled the Old Cloud Messaging API which is longer and starts AAAA.................., the messaging works.
The new FCM API v1 token is shorter than the older web API key (which is now disabled by default)
When using the new FCM token (format AIza............), I get this error
B4X:
Waiting for debugger to connect...
Program started.
ResponseError. Reason: , Response: <HTML>
<HEAD>
<TITLE>INVALID_KEY_TYPE</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>INVALID_KEY_TYPE</H1>
<H2>Error 401</H2>
</BODY>
</HTML>
[jobname=fcm, success=false, username=
, password=, errormessage=<HTML>
<HEAD>
<TITLE>INVALID_KEY_TYPE</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>INVALID_KEY_TYPE</H1>
<H2>Error 401</H2>
</BODY>
</HTML>
, target=class b4j.example.main
, taskid=1, req=anywheresoftware.b4h.okhttp.OkHttpClientWrapper$OkHttpRequest@3911c2a7, response=anywheresoftware.b4h.okhttp.OkHttpClientWrapper$OkHttpResponse@4ac3c60d
, tag=java.lang.Object@4facf68f, invalidurl=https://invalid-url/, defaultscheme=https
, main=null, httputils2service=null]
But when I went to Cloud Messaging API and enabled the Old Cloud Messaging API which is longer and starts AAAA.................., the messaging works.