How to login bot via WTelegramClient - bots

This library allows you to connect to Telegram and control a user programmatically (or a bot, but Telegram.Bot is much easier for that).
I see WTelegramClient can control a bot, but I don't know how to login a bot. Please give me an exsample just like login user account.
I have used TDLib, but I also can't login a bot. If you know how to login bot via TDLib, please tell me, it's also helpful.Thanks!
ps:I want to login a bot, not user. And I know Telegram Bot Api, but I need use user and bot together.

make your Config callback answer to "bot_token"
and call client.LoginBotIfNeeded()
or simply client.LoginBotIfNeeded(bot_token) in latest version

Related

Microsoft Bot Framework: How to add Bot to chat via messaging extension?

Let's assume a user chats with another user in a 1:1 chat. (Might also be a group chat.) The user adds a bot and continues to chat while the bot now adds value to the conversation.
We are searching for a way to make adding the bot to a chat as seamless as possible through a simple button click. It seems the closest we can get to a button is using a messaging extension action command.
When the user invokes the messaging extension our backend service runs and can respond e.g. with a card. Now instead of a card is it possible to generate a response to add a bot? There are special responses e.g. for authentication. Is there a response telling the Teams client to add a bot?
Any hints are appreciated.
JIT installation of bot is an option here. You will be able to add bot to user conversation. Check following sample application which helps to add bot instantly: https://github.com/SubbaReddi/89.teams-just-in-time-installation

Have my Telegram bot use my credentials to forward a message

I am in a private Telegram channel (of which I'm not an admin), and I need to create a bot which forwards the messages I get in that channel. I cannot make the bot a channel admin.
I've read the API, and couldn't find a hint to serve this purpose.
Is there a way maybe of letting my bot authenticate in telegram using my credentials? That way it receives the messages and can forward them.
Is it even possible to automate this process using a Telegram bot at all?
Thanks
If you need to make The Bot is Admin you must be the Admin as well
Thanks

Facebook chatbot with node, express.js, ngrok and Dialogflow

I made this bot using express.js, node.js and ngrok. Its automatic answers are working fine, but this is happening only to my user, the user which created its facebook page, if other people message it, it won't respond.
I've already made it public, I have no idea what to do. What do I need to do so the bot respond to all users that message him?
I think its something about the Facebook configuration, because the bot is responding properly. How can I get help on this?
Before a Facebook app goes to live, you have to make sure by the facebook authority, the app is using data in an approved manner.
From your app dashboard, you have to submit the application for review.
Before you can switch your app to Live mode, we may need to make sure
that you will be using our products and data in an approved manner. To
achieve this goal, we require many apps to undergo App Review.
Without reviewing the application only the developers and the page associates can interact with the bot.
Check the docs here.

How to Auth from an external service to the bot framework?

I have an external service with is own database where the users can log in.
Now I have a bot in NodeJS using Bot Builder and the Bot Framework.
I want to link them.
Is there anyway that the bot recognize the users from the other service everytime they open a new conversation and everytime they write something in the bot?
I've just tried with web chat before and I know that with channels that they support like Facebook, Telegram, Skype etc is easy to recognize the users every time they come back, but I don't know how if it is possible to do this with an external service where the users are already logged in and they want to talk with the chatbot.
I don't know how could I generate an authtoken or something that the bot framework read it and recognize the user.
You can use the DirectLine API to allow your bot and a custom client to communicate to each other, a sample can be found here, and here if you want to use WebSockets.
You can also add authentication to your bot via Azure Bot Service to use OAuth as stated here, where you will find samples too.

API.AI - How to authenticate user with Gmail account OR Active directory in chat bot

We are developing a chat bot for finance.
So once user going to start chat, bot should prompt for login. Then Once click on login, user should be redirected for login form and able to login with correct credentials, and bot should able to understand that user authentication succeeded or failed.
We are going to use our own custom platform(Agent page) i.e html page to communicate with api.ai.
Please provide info, if any one has done similar stuff or how to accomplish it.
As far as I understand it the recommendation is to pop up a browser window for the authentication (with the correct auth url for the service you want the user to auth against) and then store the access token in the bot's state/db for this conversation.
Have a look at for example https://blogs.msdn.microsoft.com/tsmatsuz/2016/09/06/microsoft-bot-framework-bot-with-authentication-and-signin-login/, should give you some ideas.
Well, since it's a finace chatbot developer, I can try to give out what I know. I would advise that the chatbot should be on a different website. I'm saying this because if a person fails the login form and user credentials,the chatbot can actually teach the person how to do it, what his or her mistakes were, and how to correct them. if people see this and it's easier,they will pay more interest into your website. Or if that doesn't work, the user should be directed to a Facebook page,or an agent page.

Resources