Bug? FirebaseNotification

woniol

Active Member
Licensed User
Longtime User
Hi,
I'm using Firebase Notifications to send notifications from B4J server to my Android(B4A) app.
It all done according to this example: https://www.b4x.com/android/forum/t...-messages-firebase-cloud-messaging-fcm.67716/

It works fine most of the time but sometimes after sending the request using this code from the example I get this in Job done:
B4X:
Reason: The request was missing an Authentication Key (FCM Token). Please, refer to section "Authentication" of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server., Response: <HTML>
<HEAD>
<TITLE>The request was missing an Authentication Key (FCM Token). Please, refer to section &quot;Authentication&quot; of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>The request was missing an Authentication Key (FCM Token). Please, refer to section &quot;Authentication&quot; of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.</H1>
<H2>Error 401</H2>
</BODY>
</HTML>

The same Server Key is passed every time.
I use jOkHttpUtil2_NONUI 2.70 in my B4J app.

Any ideas what can cause this strange error?
Some problems in: Job.GetRequest.SetHeader("Authorization", "key=" & API_KEY)
or some Firebase issue?
 
Top