Getting topics a user/app is subscribed to

690 views
Skip to first unread message

Tim Fowle

unread,
Oct 10, 2022, 1:42:18 PM10/10/22
to Firebase Google Group
Hello

Due to using a new Firebase project that no longer has the Legacy Server Key I am updating some calls around topic management.

For the subscribe and unsubscribe I can successfully use the Firebase Admin SDK in Java and makge the calls.

I also have code that checked what topics a device/token was subscribed to by calling:

This used the "Authorization: key=AAAA....." header to authenticate. With the new project I no longer have a key so I have tried to use the "Authorization: Bearer <token> " with tokens that work for sending pushes etc. But these all result in Unauthorized responses.

The questions are:
  1. should this method work or does the API not support the same auth as "fcm.googleapis.com?
  2. Have I missed an api somewhere in com.google.firebase.messaging that provides this?
  3. If both are no, is it even possible to get a list of subscribed topics from a token?

Thanks

Tim
Reply all
Reply to author
Forward
0 new messages