How to get User credentials in Azure chatbots - azure

I have created a baisc QnA Bot using Azure services. But now after deploying the bot. I want it to be able to receive user mail id. So that I can give specific results on basis of the user currently using the bot.
Is it possible?
And what is the correct way of doing so.
Thanks in advance.

Please refer to the suggestion mentioned in this SO thread.
For details about how to obtain an access token for your bot, see Authenticate requests from your bot to the Bot Connector service.
Write directly to storage Azure blob transcript storage provides a specialized storage option that allows you to easily save and retrieve user conversations in the form of a recorded transcript.

Related

Can't I query for other account IDs because I don't have the review done?

I am using "business_discovery" with the IG API, which works perfectly for me. With this I get the id of the Instagram account I want to work on. But when querying for the insights of this account I get an error. I think it must be because I have to send the app for review. My question is, once I pass all the revisions, will I be able to query insights from commercial accounts that are not associated to my account?

OAuth2 authentication for Microsoft Graph using service account credentials

I would like to create a webservice capable of automatically sending messages in Microsoft Teams. I tried authenticating as an application, but currently Microsoft does not support granting application permissions to send messages in Teams, so the only choice here is to authenticate using a service account with real credentials (Unless there is another way?). This method only specifies using user interaction to log in as a user.
I would like to use a service account teamchatbot#domain.com to authenticate with Microsoft Graph in order to send messages on Microsoft Teams. (similar to this but since I'm not accessing a resource it is a little different.) Is there a way I can silently obtain an access token on behalf of the service account in order to send messages?
It seems that you have a misunderstanding.
Your scene is actually the same as this post.
You should use Resource Owner Password Credentials to call Microsoft Graph API to send messages.
Based on permissions, you need the Group.ReadWrite.All delegated permission. So you need to add this permission into your Azure AD app firstly.
Don't forget to click on "Grant admin consent for {your tenant}" after you add this permission.
Then you can get an access token like this:
You can see that https://graph.microsoft.com/Group.ReadWrite.All has been included in the response.
Now you could use this access token to call POST /teams/{id}/channels/{id}/messages.
There are a few other ways I can think of.
1) One is that you can create a Bot using the Microsoft Bot Framework, and once that bot is installed to the particular team, it can send "pro-active" messages (i.e. not a message in response to a user's message, but rather whenever you need).
Essentially, when you bot is added to the team, you get access to a specific event in your bot (OnMembersAdded for a general bot, and there's now a new event just for Teams). See more on this in my answer on Detect bot application open event. In this event, you get the information you need for later, which you can store in a database or wherever, and then create the message as if it's your bot posting to the channel. You can see more on that at Programmatically sending a message to a bot in Microsoft Teams.
This option above is a lot of work, but useful if there's other functionality you want from a bot (e.g. the ability to receive messages from the users)
2) Another, and even more simple way, is to create an incoming webhook directly to the channel. Here's a post on doing this using PowerShell, so you can do that for simple testing and extrapolate from there for Node.
Of course, things like Flow (Power Automate) are an option too, but you're already writing code so one of the above is probably easier.
Hope that helps

Getting API key from API on google Chatbase

I would like to create Chatbase bots for new users/domains automatically.
For example if user has used Google-login and his authorization key is stored and analytics information like website url etc is fetched it would be nice to automatically create a bot for user.
So the question is: is there a possibility to get API-key for new bot programmically on Google Chatbase from API?
Unfortunately it is not possible to programatically create or edit Chatbase API keys.

Chatbase API to get analytics data?

We are using Chatbase for multiple clients that we identify with a different version number.
See my previous question here: Track multiple context for the same Bot
We have a dashboard for all those clients and would like to show them their own data. A bit like Google analytics allows it.
So:
Is an API in the pipeline (I couldn't find any existing resources)
If not, in what alternative way could we get the data to present it?
We have a .csv export that is currently limited to the first 500 rows of your message variations report. It is on our roadmap to increase the scope of this report, however there is no official timeline for release.
Our recommendation for deploying an integration like you described in your message is as follows:
Have the user create a Chatbase account in order to obtain the API key
Have the user integrate their analytics on your platform by providing the API key
Send the messages from their bot to their Chatbase API
Provide the user deeplinks to the Chatbase reports from within your UI
Alternatively, you could configure your bot to send a redundant message to an internal database, or bigquery table to have access to all of your logs.
If you would like access to data you have sent to Chatbase up to this point, please contact chatbase-support#google.com and provide your bot's name and/or api key and we can provide a one-time export.

Twitter Account Activity API - Webhook URL must be defined issue

I have a nodejs chat bot app which to listens to direct messages from twitter account. It was created with stream API of twitter. Now we are trying to migrate to new twitter Account Activity API.
We have used this package to do this. But we met with this issue "Webhook URL must be defined to create subscriptions". Actually we have set a Webhook URL and still we have this issue.
Is there anyone who have implemented Twitter Account Activity API successfully? I could use some help here.
if you haven't found an answer, here (account-activity-dashboard) is a web app that will help get started with Twitter's premium Account Activity API. The account-activity-dashboard will help you configure the webhook urls and the subscriptions.
You can also have a look at my forked repo which i used to create my twitter bot

Resources