You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mobile app SDK has two methods: OptIn and OptOut to specify whether the user is opted in to receive push notifications or not. There is also a optedIn method to find out what the value is.
How do I fetch that value with onesignal-node-api ?
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
You can access the subscription property from the user's subscriptions then pluck out enabled
Something like this👇🏽
const{ subscriptions }=awaitOneSignal.fetchUserAsync('APP_ID','ALIAS_LABEL','ALIAS_ID')subscriptions.map(subscription=>{const{enabled }=subscription// do stuff with this info})
I'm assuming you already know the Subscription ID you're after, so change map to whatever function you like.
How can we help?
The mobile app SDK has two methods:
OptIn
andOptOut
to specify whether the user is opted in to receive push notifications or not. There is also aoptedIn
method to find out what the value is.How do I fetch that value with
onesignal-node-api
?Code of Conduct
The text was updated successfully, but these errors were encountered: