replace Microsoft Teams SRTP Key with my own - cryptography

I would like to replace the cryptographic key used in the Microsoft Teams by my own.
I am thinking about the master SRTP key, the web client or the stand alone one on Microsoft Windows.
I guess it is somewhere inside the javascript code (on the web client) ?
Is it possible, or is it protected in some way ? Where is it located ? Is there an api to get/set it ?

What you are asking is not really possible.
I think you are asking to wrong question.
If you want the audio/video streams for a meeting call, there is only one way:
Create a stateful call bot using the Cloud communications API.
The problem is getting the bot into the call to see the streams. Either the bot "starts" the call or the bot has to be invited into the call somehow. The how is up to you.
The other option is to use the Teams policy-based recording to get your bot invited into the call as part of call setup. Becareful of this option as it does come with a overhead. One to one calls will now go through the conference server to allow the third leg to be involved in the call. This I have found to have call startup overhead.

Related

How to call Google NLP Api from a Google Chrome extension

My aim is to select some text from a web page, start a google chrome extension and give the text to a google cloud api (Natural Language API) in my case.
I want to do some sentimental analysis and then get back the result to mark/ highlight positive sentences in green and negative ones in red.
I am new to this and do not know how to start.
The extension consists of manifest, popup etc. How should I call an API from there that does Natural Language Processing?
Should I create a Google Cloud Application with an API_KEY to call? In that case I would have to upload my credentials right?
Sorry sounds a bit confusing I know but I just don't know how I can bring this 2 things together an would be more than happy about any help
The best way to authenticate your app will depend on the specific needs and use cases of your application. You can see an overview of all the different methods here.
If you are not planning on identifying users nor on using a back end server that handles authenticating (as I assume to be your case), the best option would indeed be to use API keys. They do not identify the user, but are enough for the Natural Language APIs.
To do this you will need to create an API key for the services you want and add the necessary restrictions to make the key as secure as possible. Detailed instructions on how to do this and how to use the key in a url can be found here.
The API call could be made from within the Chrome extension with any JavaScript method capable of performing POST requests. For example using XMLHttpRequest or the Fetch API. You can find an example of the parameters that need to be included in the request here.
You may run into CORS issues when making the request directly from the extension. I recommend reading this answer, where a couple of workarounds for these issues are suggested.

Tokbox OpenTok client to call another client

I want to build an application where it is possible for one client to call another client using webRTC. I've started to look into webRTC providers and I've found Toxbox among others.
Is it possible, using TokBox OpenTok, for a client to actually make a call to another client (similar as a regular phone call)? From their docs and specifications it seems that it is only possible to create a "session" (a room in which participants meet and chat).
Am I missing something, or are they only providing sessions that people join/leave?
Twilio seem to offer what I need here,
but I find it strange that I cannot find something similar at Tokbox.
Thanks,
Muff
Yes it is possible.
You need to make the distinction between the type of API the platform exposes to what you can do with it.
While the OpenTok API is built around the concept of a room/session - you can easily use that concept to create a call. There are many openTok developers who do just that.
Twilio indeed offers the same capability - as are many others (a partial list can be found in this report - https://bloggeek.me/webrtc-paas-report/ - while the report is a paid one, the list is available on that page

What is the best way to maintain API change-logs using API Blueprint?

Can anyone tell me what is the best way to maintain and communicate change-log to api consumer using api-blueprint? Preferably I don't want to use another 3rd party service like apichangelog to communicate the changes.
We (Apiary) do not offer any tool which can help you doing that at the moment.
If you're using any kind of hosted source control system (GitHub, Bitbucket), you could throw a webhook whenever a change reaches the master branch, which usually means something like I introduced a change in my API.
Once that happens, in your webhook handler you could have a look to all your issued API Keys, reach the provided support email and send a notification there.

Telegram Automation

I'm working on a program, it's mission is that we define some number for it (some of our mobile numbers) and it should register them in Telegram, and then gets all messages that send to that number. As you may know, the registration in Telegram needs providing a phone number and after that a validate the number by a code that is sent from Telegram.
I read Telegram API, but it was complex and with no certain example and explanation.
I need your help, Thanks.
To implement Telegram chat,
First of all, you should obtain your own api_id and api_hash as described here.
Read the document and get ideas about the terms used in the Protocol which will be useful to go further.
Create a TCP connection with Telegram Server via port 443.
Telegram uses a key called 'Authorization Key' (ie Auth key) for Encryption/Decryption and it will be derived in both Server and Client using Diffie-Hellman Algorithm by various steps. You can create this Auth key by following the steps explained here and you can also see a sample for this process here.
When you are successfully done all steps, you will finally receive 'dh_gen_ok' response from Telegram server.
Now you can send RPC queries (Telegram APIs). The list of APIs is given in this link https://core.telegram.org/methods
This is just brief points which will help to give an idea about this. To implement the whole process, you need to read the documents and get to know the flow and all its limitations. Hope it helps :)
Yes you can do this
BUT
first of all, you should write a program (class) for one number
and after that
create another instances of that class for another numbers
if you write main class (work by One phoneNumber)
it's very simple to extend you program to work by many numbers
Good Luck !!!

API architecture - what to include

I am building a RESTful api for a project at the moment, the API will used for a web application, a mobile application and maybe eventually a desktop application.
There are a few instances where emails need to be sent to notify the user of an event that has happened within the application. What I am not sure of is where to does a an APIs job finish, should the API be responsible for sending the emails, or should the application send the emails based on what response comes from the API?
Basically what I am asking is where does an APIs job start and finish, is an APIs job just getting date from point A to point B? Or can it deeper capabilities?
It's a common mistake that many developers are still making. An API is just an interface through which you expose your underlying system to be accessed by other systems. How you expose your system depends on what functionalities you want to be visible to the external world. Moreover, your business logic should be entirely on your backend rather than spread over your mobile/web applications.
Having said that, my answer is yes! Don't think of it as "my API is sending emails". Think of it as "my MAIN SYSTEM is sending emails". Whether you want to expose this email functionality through your API or not is another completely different thing.