-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Telegram] Get user location #1595
Comments
If I'm not wrong, when you send your location from Telegram, you receive it in an array of entities in your message (something similar to an attachment). The entities allow the exchange of common contextual metadata between the channel and bot. At least it is how it works in node.js. Take a look at the "Entities Property" section here https://docs.botframework.com/en-us/csharp/builder/sdkreference/activities.html I don't think you can test it with the emulator. I used ngrok and with a real Telegram client. It's easy to log the messages you receive to see the entities. I hope it helps. |
@palmerabollo I cannot log the http requests with ngrok each time I get a 400 bad request error. Maybe my setup is wrong. When I check the log stream in Azure, it seems to happen when awaiting the activity result or in the framework. Microsoft.Rest.HttpOperationException: Object reference not set to an instance of an object. |
Hi @GhostAtom palmerabollo is correct this isn't something you can catch in the emulator - it is Telegram-specific. But you should be able to run your bot locally with ngrok and debug it that way. You might double-check that your locally running bot is getting initialized with the correct Microsoft appId and password. Also ensure that your bot registration page in the Dev Portal has the right ngrok endpoint (it changes each time you launch ngrok). It should look something like this:
|
Hi @eanders-ms I tried another time but still have 400 error code.
|
@eanders-ms any other ideas? |
@GhostAtom Is your bot registered with the Bot Framework? What is its MSA AppID? |
@eanders-ms yes |
@GhostAtom Are you still seeing this error? It occurs to me that it would be useful if the emulator could send a location to the bot. |
Is it possible to get current location of user through node.js chat bot using botbuilder with webchat as a channel??? Till now I found "botbuilder-location" npm used to track the location.. But with webchat how would I be able to get the current location... |
(Might be a bit late now, but for future reference.) When the bot receives a location through Telegram, the
As you can see, while the |
Barring confirmation from original poster, it looks like this issue (question) can be closed since an apparently proper answer has been given. For now, I am labeling as "question" and "answered". |
How can I get the location from Telegram in c# ?
How can I test the location handling with the bot connector emulator?
Do you have some exemple of that use case? I'm scratching my head for too long. Thanks for the help.
The text was updated successfully, but these errors were encountered: