Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Add API for checking subscription status of a given topic #225

Open
js opened this issue Aug 31, 2017 · 29 comments
Open

FR: Add API for checking subscription status of a given topic #225

js opened this issue Aug 31, 2017 · 29 comments

Comments

@js
Copy link

js commented Aug 31, 2017

In order to show users a list of subscribed topics (eg UI with the ability to remove active subscriptions) we have to do one of two things today:

  • implement a shadow storage of active subscriptions (in Firebase DB or elsewhere), with all the potential for sync-misshaps
  • implement the instance ID API and have the app query our server, which then queries Googles servers, resulting in more latency, server maintenance/dev overhead

I sorely miss a Messaging.messaging().isSubscribed(to: topic) like API in the FCM SDK for checking whether a topic is currently subscribed to by the current user

@rsattar
Copy link
Contributor

rsattar commented Aug 31, 2017

Hi @js! Agreed it would be nice to have that in the SDK. There is a REST API to request this, it currently requires your API Key to perform that check, which the SDK doesn't have.

@hixfield
Copy link

+1

1 similar comment
@FDREAL
Copy link

FDREAL commented Sep 26, 2018

+1

@casperzandbergenyaacomm
Copy link

This is the main reason my company stays away from topics on the client side. I'd love to see an update on this!

@charlotteliang
Copy link
Contributor

As rsattar stated, you can use the REST API to request this, currently we don't have plan providing such API as exposing your API key in the client would expose it to the public and allow anyone to send messages to the user of that application.

@sowdri
Copy link

sowdri commented Jan 3, 2019

@chliangGoogle Totally agreed that "exposing your API key in the client would expose it to the public", that's why this issue has been raised to create a new API while will let the client query for the subscription status of any given topic, or more precisely the list of all active subscriptions for the given device.

Right now the device has the ability to subscribe and unsubscribe from topics, which inherently means that the calls to subscribe/unsubscribe APIs are authenticated using a mechanism that is different from the server API key, so it is only reasonable that the client has the ability to get the list of subscribed topics too.

Please explain the reasoning behind your thinking.

@mpawlo
Copy link

mpawlo commented Jul 25, 2019

+1

@charlotteliang
Copy link
Contributor

Thanks @sowdri for explaining the request. Yes if a solution without including a server key would be ideal, we are bringing this request to our team and will let you know with the updates.

@dunyakirkali
Copy link

@chliangGoogle Any updates?

@BeauNouvelle
Copy link

Should we keep holding out for this, or just assume that it will never be done?

@paulb777 paulb777 reopened this Oct 23, 2019
@morganchen12 morganchen12 removed their assignment Jan 8, 2020
@KyleGoslan
Copy link

Is there any movement on this (or has anyone come up with an elegant solution)?

@glemmaPaul
Copy link

Same here as @KyleGoslan is asking, any movement on this?

Pretty concerning this ticket is from 2017 and there is no movement on it, seems like quite some people need this.

@charlotteliang
Copy link
Contributor

Thanks for bring this up to our attention, please upvote at the top, and I will bring this to our PM again to see if priority shifts.

@imannms
Copy link

imannms commented Jul 14, 2020

I need this too.

@ziv-li
Copy link

ziv-li commented Jul 20, 2020

Me too

@ammarbukhari
Copy link

We need this too.
It does make sense to have some thing like this as users can subscribe and unsubscribe. But if the user is not subscribed to a topic, and you call unsubscribe. What will happen. The task should not be successfull that means, you already check if the users is subscribed to a topic before unsubscribing.

@ma684351
Copy link

Me too

@marlokessler
Copy link

We need this too

1 similar comment
@xiangyangyang
Copy link

We need this too

@BeauNouvelle
Copy link

Will never happen folks. Give up.

@ryaaanb
Copy link

ryaaanb commented Jul 26, 2022

+1

1 similar comment
@chrislangston
Copy link

+1

@taitasu555
Copy link

me too

@mschinis
Copy link

mschinis commented Sep 7, 2022

5 years later, still waiting 🤙

@taitasu555
Copy link

We need to check users' subscriptions because we don`t know if users definitely subscribe or not. we are not going to use this service if no progress

@charlotteliang charlotteliang removed their assignment Oct 23, 2022
@pinpong
Copy link

pinpong commented Feb 18, 2023

+1

@ndlovucn
Copy link

This is a deal breaker , please action this

@herrernst
Copy link

We'd like to have this too!

@zane-carter
Copy link

Is this a planned feature @paulb777 ?
As I understand it's possible on the android SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests