[teams]How to update messaging endpoint via API or SDK? - api

I am working on a chatbot in NodeJs and we are using Ngrok to establish a tunnel, the problem we have for teams is that every time we relaunch Ngrok we get a diferent url so i have to manually change the messaging endpoint on the botframework website(under settings)
Is there a way to do this via the api? or maybe the SDK?
This was not an issue for other chat platforms but for Teams i cannot find this feature.
Claudiu

Unlike some other chat/bot platforms, Bot Framework (and therefore Teams) works by having the chat service initiate the connection to the bot instead of the other way around. That's why every bot requires an https: endpoint.
Ngrok is one way to do it without running the bot in the cloud, but as you note those temporary URLs only last 7 hours. You can purchase the premium version of Ngrok which lets you have static subdomains - for example at our Build conference I used https://build2018.ngrok.io.
One of our developers also created Tunnel Relay which you can download. The utility itself is free but you have to have an Azure subscription and use Azure Service Bus - which at the basic tier is $0.05 per million transactions. All the details, including a download link, are on the GitHub page linked above.
There is no public API for changing your bot's messaging endpoint. (If there were, it would be a great way to steal the traffic from other bots.)

Related

Remote setup Whatsapp web and exposed via API

I have seen some providers on internet where you can send Whatsapp messages using an API. Its not official WA API integration.
These providers will spawn a instance for you, show you a QR code. You need to scan the QR code in your WA app. Once scan is completed, that instance is added as linked device in your app.
Now they provide an API which you can use to send messages. API accepts instanceId, mobile number and message as query param.
These messages are send using your WA account and number. You can see those sent messages in your app.
Basically everything is happening from your account via web whatsapp but from a remote setup and using an API.
Here are a screenshot to help you understand what I am trying to convey.
Sample API call:
https://DOMAIN-HERE/api/send.php?number=84XXXXxxx&type=text&message=test%20message&instance_id=6XXXXXXXXXX&access_token=XXXXXXXXXXXX
I want to setup something similar. I searched the Internet on how does this work and how I can create my own similar setup but could not find anything.
Can someone please point me in the right direction.
What all these providers are doing is hosting a running instance of a whatsapp web client using your phone number, this is why they ask you to scan the QR code (same as whatsapp web does).
Users of this kind of services must be crazy to allow running an unattended instance of whatsapp against their own phone account, as on the host there's full access to your whatsapp encryption keys, contacts, history of messages,... but the security implications are for a different topic.
If you want to have a headless instance of whatsapp-web like the one they offer, you should have a look at repos like this one here: https://github.com/tulir/whatsmeow (there are others similar, for different languages).

How to Register phone number on Whatsapp On-Premises API for Demo purpose

I am working on implementing a POC application that needs to use Whatsapp API e-commerce features. https://blog.whatsapp.com/making-it-easier-to-shop-on-whatsapp-with-carts
For that, I have already set up the On-Premises Docker setup. But I am stuck with registering the phone number.
seems it will take time to verify the account. actually, we don't have much time and need to do a quick demo for our client.
is there any other way / any sandbox environment to try these features without those registration and verification processes?

Check for API Protocol to ensure no downtime

I have a Xamarin.Forms mobile application that connects with a soap web service. The same domain hosts multiple web apps. I need to update the domain with SSL, but I do not want any downtime in the application.
My first thought was to check see if the https url responds and if not to check for http.
How can I check the protocol of the domain from a mobile app? Is there any better idea to accomplish this with no downtime?
More Info: The solution I am proposing is only so that there is no downtime while the application passes review in the Appstore and Google play. After that I will release a second update to allow https only. I need to have no downtime in the applications using the API while the transition happens. I am not saying that this is a permanent solution or a good practice.

Do I need an API Gateway

I have an application that has a couple of features that I would like third parties business to avail of. for example the user information gets passed to us and we run ID checks and send back a token with information.
I think I can use a third party API management service like 3scale but what do I have to do on my end to 'expose' this API?
Thanks!
With AWS API Gateway, you can setup a simple http proxy to your application. Based on your needs, you can use features like auth, throttling, API keys management, client certificates etc.
Here is a blog explaining some of this.
Hope this helps, Ritisha.
As mentioned by Ritisha, API Gateway definitely can work, but it is sort of lock it.
I would recommend checking https://tyk.io/, which is an open source Gateway with commercial options. And for example it provides you Cloud version, where you do not need to expose any ports on your side at all. You just configure your API in dashboard and can just bind your CNAME record to the proxied API. This should work really well to try it out. And if you grow up this options, you can host it on your own, or use Hybrid environment, when all user requests come to your own server (no 3-rd parties), but on the other hand, have nice configuration dashboard in the cloud.
Hope it helps!

Can i create a custom authentication system on top of SkylinkJS

i'm building a website that uses WebRTC to share audio and video. Now i'd like to access WebRTC features on Android devices so i can create an app that can receives audio and video streams from the website.
I've looked for a technology allowing me to do that and I've found SkylinkJS.
It looks great but i'm wondering something. Can i build a custom authentication system on top of SkylinkJS logic. What i mean is that i'd like to make sure the connection to SkylinkJS rooms are initiated by users actually authenticated on my platform.
At the moment, i do that using socket.io but i can do it since i'm using raw WebRTC. How can i do that using SkylinkJS? Using the REST API?
Thanks.
PS: i cannot tag this question with 'skylinkjs' since it's a new tag, but it mights be cool if someone could do it.
Yes you can integrate that with the REST API in this Applications REST API link here - . You can generate your own credentials.
You can generate the connecting credentials from your server and then when the User logs in, generate the credentials for Users to connect to the Room. See more in their support article.
SkylinkJS uses key based authentication mechanism to authenticate against the Temasys signaling servers. This ensures that any application using Skylink can only connect to calls in your application if the app can provide the same secure keys (from your Temasys developer account).
Your best bet in looping in Android would be to use the android counterpart. http://skylink.io/android/