firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.51k stars 1.44k forks source link

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

Open js opened 6 years ago

js commented 6 years ago

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:

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 commented 6 years ago

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 commented 6 years ago

+1

FDREAL commented 5 years ago

+1

casperzandbergenyaacomm commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

+1

charlotteliang commented 5 years ago

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 commented 4 years ago

@chliangGoogle Any updates?

BeauNouvelle commented 4 years ago

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

KyleGoslan commented 4 years ago

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

glemmaPaul commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

I need this too.

ziv-li commented 4 years ago

Me too

ammarbukhari commented 3 years ago

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 commented 2 years ago

Me too

marlokessler commented 2 years ago

We need this too

xiangyangyang commented 2 years ago

We need this too

BeauNouvelle commented 2 years ago

Will never happen folks. Give up.

ryaaanb commented 2 years ago

+1

chrislangston commented 2 years ago

+1

taitasu555 commented 1 year ago

me too

mschinis commented 1 year ago

5 years later, still waiting 🤙

taitasu555 commented 1 year ago

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

pinpong commented 1 year ago

+1

ndlovucn commented 1 year ago

This is a deal breaker , please action this

herrernst commented 1 year ago

We'd like to have this too!

zane-carter commented 4 months ago

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