How to register a user device for chat push via API call? Only see documentation on CLI - getstream-io

I need to register a user's device to get chat push notifications. The docs only show how to do it using the CLI (stream chat:push:device:add) but I need to it via API or client. Is there an API endpoint to do this?

The /devices endpoint (GET, POST, DELETE) is used for managing devices. Currently there's SDK examples available for NodeJS, Python and Ruby here https://getstream.io/chat/docs/#push_devices.

Related

How to register whatsapp webhook

I need to do an integration with twilio where the application serves multiple accounts. With that I have the need to receive the whatsapp integrations in different URL for each user of the application.
I would like to register these URLs in a simple way, without my user having to access the twilio panel.
How can I register a whatsapp WebHook using HTTP APIs or nodejs SDK?
I searched the documentations and even debugged the nodejs SDK and couldn't find a way to do that.
What’s integration allows you toconfigure one URL per number. How about setting that URL to your backend which then breaks out the behavior based on the from number.

How to get and pass user conversation data to backend API in Azure Bot Framework Composer v1.4.0?

I am new to Azure Bot Framework Composer.
I am creating chatbot using Azure Bot Framework Composer(without writing code) which need to be launch in Angular Web Application from Azure Cloud after deployment.
In my chatbot project, need to fetch the user conversation data and send it to backend API from Azure Bot Framework Composer.
How to achieve this?, anyone help on this.
You can view the conversation data using ${conversation} scope and from dialog stack can access required information. To get last conversation data can use ${turn.Activity}. For sending to backend API, create HTTP post method and pass the data in the body of your request.
Without knowing more details on your chatbot project, one reasonable approach to take is to use the Send HTTP Request action in the composer.
After you obtain the values from the conversation that you are looking for, (can be stored in conversation / dialog variables), you could then pass it onto an HTTP send request and deliver that to your backend API.
With this, you can send any payload to your backend API.

configure Gmail accounts to send notifications for mailbox updates to a topic

I am new to gsuite application.
I am trying to push any new email that comes to Gmail I want to push to a topic.
Here is the link i am following:
https://developers.google.com/gmail/api/guides/push#protocol
To configure Gmail accounts to send notifications to your Cloud Pub/Sub topic, simply use your Gmail API client to call watch() on the Gmail user mailbox similar to any other Gmail API call.
I was not sure how it can be achieved? any sample running code will be great.do we need to write python scipt or do we need to write cloudfunction to configure, please advise?
This tutorial may be a good place to start: it walks you through the steps of enabling the Gmail API, authorizing access, and setting up Cloud Functions for watching for messages and processing incoming messages. The tutorial is in JavaScript, not Python, but it should give you a good idea of an architecture that can accomplish what you're interested in.
As for Python-specific resources: the Gmail API Python quickstart is a good place to get started making Gmail API calls. Once you have that working, you can try switching it to call watch().
Note that if you want to continue to get notifications on your Cloud Pub/Sub topic, you will need to call watch() at least every 7 days. One way to achieve this could be to use Cloud Scheduler to periodically trigger a Cloud Pub/Sub topic that in turn triggers a Cloud Function, which calls watch().

node.js and push notifications

I'm quite new on Node.js and without any knowledge on mobile development apps but I would add push notifications into my server app.
On npm I found this module:
https://www.npmjs.com/package/node-pushnotifications
but, after some search and if I understand well, I should have some specific credentials for sending notifications to all devices, first question is: is correct?
Assuming that the answer is yes, are there something to jump this check? Another module, some test credentials or what you want?
I would some generic solution but, if it is not possible, it could be useful also an IOS compatible solution.
This is the best packages for push notification for nodejs:
ios: https://www.npmjs.com/package/apn
android: https://www.npmjs.com/package/node-gcm
APNS is a push notification service for apple(mobile) devices.
You need to integrate SDK's provided by the 'apple developer doc' in your app to integrate push notification services. Then, Once the app installs in the mobile a token will be generated(unique for a specific device).You need to save this token.
From your server side You can send the push notifications to a device with the token that you got.
There is also an SDK to send Push notification from server side.
The best Provider is AWS, you can check this in details by this link

How to get conversation details in microsoft bot framework for skype?

I'm able to get conversation details for webchat using https://webchat.botframework.com/api/conversations/[conversationId]/messages
Service URL for skype channel is https://skype.botframework.com, but I dont find any documentation for getting conversation details
You can use the DirectLine Rest API (see docs).
The Direct Line API is a simple REST API for connecting directly to a single bot. This API is intended for developers writing their own client applications, web chat controls, mobile apps, or service-to-service applications that will talk to their bot.
Within the Direct Line API, you will find:
An authentication mechanism using standard secret/token patterns
The ability to send messages from your client to your bot via an HTTP POST message
The ability to receive messages by polling HTTP GET
A stable schema, even if your bot changes its protocol version
You need to enable the DirectLine channel for your bot on (see screenshot)
You don't have to access each specific channel endpoint separately, you can do it all (with some limitations) through the DirectLine API.
Start a New Conversation
POST /api/conversations
Get Messages in a Conversation
GET /api/conversations/{conversationId}/messages
Send a Message
POST /api/conversations/{conversationId}/messages
The full details are in the docs as linked above.
Hope this helps
Can you be more specific about conversation details and what you're looking for?
Generally, you shouldn't assume those URL's are static BTW; an incoming message from the Bot Framework will have a ServiceURL that should be used for the life of that conversation. Some services may have multiple ServiceUrl's that they give out for different users.

Resources