Firebase Cloud Messaging suddenly returns 401

I have a really confusing issue. I'm setting up an Admin app that would use Firebase Cloud Messaging to send a push notification to the target client. It was working for a while, and then it suddenly stopped working and I made no changes to the code - that's the confusing part!

Here is the Firebase Configuration.


public class FirebaseConfig {

private final String databaseUrl;

private final String configPath;


public FirebaseConfig(

@Value("${firebase.database.url}") String databaseUrl,

@Value("${firebase.config.path}") String configPath) {

this.databaseUrl = databaseUrl;

this.configPath = configPath;



public DatabaseReference firebaseDatabase() {

return FirebaseDatabase.getInstance().getReference();



public void init() throws IOException {


* Create service account; Download...

Read More »

By: StackOverFlow - Saturday, 21 July

Related Posts