Web & Mobile
Confused about "Web & Mobile"?
Let us know how we can improve our documentation:
Many of our users build native iOS and Android apps, web apps, or mobile apps with React Native. Stream can be used directly inside a browser or mobile application. The only difference is how you initialize the API client. Because browsers and mobile apps are not trusted environments, you must create a user token server-side and pass it to your app. This way, each user gets a unique token that allows performing actions only to their feeds and activities.
Subscribing to changes
Copied!Confused about "Subscribing to changes"?
Let us know how we can improve our documentation:
Stream allows you to listen to feed changes in real-time directly on your mobile or web application. You can use the API client to subscribe for changes to one or many feeds; each time a new activity is added or removed, an update will be received directly.
Subscribing to changes in real-time is done via JavaScript using the stream-js client. If you are not using it already, you can obtain it here.
Once you have included the JavaScript client in your pages you can subscribe to real-time notifications this way:
Subscribe to Realtime Updates Via API Client
Copied!Confused about "Subscribe to Realtime Updates Via API Client"?
Let us know how we can improve our documentation:
Subscribe to Realtime Updates Using UMD Script
Copied!Confused about "Subscribe to Realtime Updates Using UMD Script"?
Let us know how we can improve our documentation:
Stream returns the following data via the realtime endpoint:
Besides the realtime endpoint, you can also connect to Stream's Firehose via SQS or webhooks. This is helpful if you want to send push notifications or emails based on feed activity.