Limitless Customer Experience Possibilities For Contact Centers – Introducing SIP Interconnect

fv_SIP_iconIt’s hard to believe that in this day and age of digital transformation you still have to announce yourself when you ring a contact center. Or even worse, why you have to repeat your account details from one agent to the next. It’s among the most frustrating of customer service experiences, not to mention inefficient and costly for operators.

Read More

TokBox at Finovate Fall 2016

Finovate__F__Twitter_LogoInnovation in banking has previously focused predominantly on customer convenience.  For all of the efficiency and convenience technologies have brought to banking, banks always need to differentiate themselves with superior service.  And that’s why many leading financial organizations are now turning their attention toward customer experience.  In an age where banking is increasingly done online or through mobile applications, this presents a challenge to many financial service organizations.

Read More

New in iOS 10: The Best WebRTC Apps Yet

ios_screenshotToday, it is easier than ever to get involved in real-time communications, using WebRTC. For those considering investing in a mobile strategy, the technology ecosystem has never been more ripe for rapidly integrating WebRTC into your application, or even starting a project afresh. Using existing build tools like Cocoapods to get started quickly with the OpenTok iOS SDK, and the new CallKit framework introduced in iOS 10, now is the best time to jump in and start building.

Read More

JWT – The New Authentication Scheme for OpenTok REST Endpoints

We have been working on a new standards-based alternative to authenticate with the OpenTok REST endpoints. With the release of the latest OpenTok Server SDKs, we will be transitioning to JSON Web Tokens (JWT) to authenticate OpenTok REST endpoints.

Why JWT?

  1. Standards-based encoding, decoding and verification.
  2. They do not expose the private secret of the partner.
  3. They are lightweight and can be attached to HTTP headers easily.
  4. JWT are self-contained,  such that each token is equipped with all the information needed for the authorization process including the expiration time and the issued time of the token.
  5. Since JWT are transferred over JSON you can use them with multiple languages. There are JWT libraries available for most languages, and there are a range of choices.
  6. They are extensible and allows the token to carry new data, making it easier to future-proof.

All of this not only makes authentication more secure, but also simplifies the developer’s workflow.

There are a lot of great resources available to find out more about JWT so we recommend reading more.

JWT in Action

We know there many benefits of using JWTs so now let’s see them in action with OpenTok REST endpoints.

Each request will require a new token. This token should be sent as the value in an HTTP header named “X-OPENTOK-AUTH”.

An encoded JWT is easy to identify. It is three strings separated by a ” . ”

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOjEyMzQ1LCJpc3QiOiJwcm9qZWN0IiwiaWF0IjoxNDcyNjkxMDAyLCJleHAiOjE0NzI2OTEzMDJ9.m-x54n9EoNZaiCVmBWyaDsOstR4asCXjc7atEBCTHLU

Each of the three parts are created differently. In order, they are called:

  • Header

  • Claims

  • Signature

Header

The header carries 2 parts:

  • Type of the token, which is JWT
  • The hashing algorithm to use (OpenTok only supports HMAC-SHA256  as the token signing algorithm.)
typ: “JWT”
alg: “HS256"

The header is base64 encoded which results in:

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Claims

The claims will carry the bulk of our JWT, also called the payload. This is where we put the information that we want to transmit and other information about our token.

When calling OpenTok REST endpoints the required claims are listed below:

  • iss: The issuer of the token (in our example this is API Key such as “12345”)
  • ist: The issuer type (in our example this is string constant “project”)
  • iat: The iat claim indicates a UNIX timestamp at which the JWT was issued. It is useful to determine the age of the JWT.
  • exp: The exp claim is a UNIX timestamp indicating when the token will expire. The OpenTok REST endpoint verifies the exp against its system clock, plus some allowable clock skew. The expiration MUST be after the current date/time and cannot be longer than the max token lifetime, which is 5 minutes (300 seconds). We recommend using exp time 3 minutes.
iss:  12345,
ist: "project",
iat: 1472691002,
exp: 1472691302

The claims is base64 encoded which results in:

eyJpc3MiOjEyMzQ1LCJpc3QiOiJwcm9qZWN0IiwiaWF0IjoxNDcyNjkxMDAyLCJleHAiOjE0NzI2OTEzMDJ9

Signature

The final and, possibly, the most important part of the JWT is the signature. It is a hash made up of three components:

  1. Header
  2. Claims
  3. Secret (API Secret)

Using the header and claims strings combined we pass them through an HMACSHA256 function with API Secret.

Our signature looks as follows:

m-x54n9EoNZaiCVmBWyaDsOstR4asCXjc7atEBCTHLU

Now we have got all three parts of our JWT. Combining the three parts, we get:

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOjEyMzQ1LCJpc3QiOiJwcm9qZWN0IiwiaWF0IjoxNDcyNjkxMDAyLCJleHAiOjE0NzI2OTEzMDJ9.m-x54n9EoNZaiCVmBWyaDsOstR4asCXjc7atEBCTHLU

Here is the code snippet you can use to create tokens.

var jwt = require('jsonwebtoken');

const secret = 'secret'; //Replace this with your OpenTok API Secret
var token = jwt.sign({ iss: 12345, //Replace this with your OpenTok API Key
 ist: "project",
 iat: Math.floor(Date.now() / 1000), // e.g. 1472691002
 exp: Math.floor(Date.now() / 1000) + 300 // e.g. 1472691302
 }, secret);

console.log('Token: ' + token);

// decode
var decoded = jwt.verify(token, secret);
console.log('Decoded: ' + decoded);

Instruction on running this code: Save the code as a .js file and from the terminal run command npm install jsonwebtoken — save (assuming you have node and npm installed) and then run node fileName.js

JWT.io is great site to go through and test out how JWTs are made. The website provides great tools for decoding and encoding of the tokens, as well as a list of open source libraries you can use to generate JWT.

Conclusion

We are very excited to move our current authentication scheme to JWT, which are standard for token authentication used by many companies such as Facebook, IBM and Google.

The adaptability of the JWT will allow you to securely authenticate the OpenTok REST APIs quickly and easily without having to worry about passing sensitive information.

Partner authentication will be replaced by a single type of authentication scheme JWT. This also means that we are deprecating Partner Auth. Our Server SDKs have added the support for JWT. Please note that we will continue to support the deprecated authentication schemes until July 2017 to give you enough time to transition to JWT.

Read More

New Release: OpenTok iOS & Android 2.9

tokbox-inc_markWe are excited to announce the release of the OpenTok 2.9 Android and iOS SDKs. We’ve made a number of important changes with this release.

What’s new?

Automatic Reconnect

With this version your client can now automatically reconnect to OpenTok sessions after drops in network connectivity. This feature helps restore connectivity during transitions between network interfaces such as Wi-Fi and LTE, allowing you to expand the duration of the communication and provide a better quality of experience to your customers. You can find sample code showing you how to update your application here.

Read More

The Rise Of On Demand Healthcare

healthcare1

When you think about the hottest startup or innovation sectors, one may naturally think of artificial intelligence, Cloud computing or robotics. And you wouldn’t be wrong. But one you might be surprised to hear is right up the top of that list is Health, and specifically on demand health.

In a revealing study by Accenture, covered in this Forbes article, the growth of the on-demand health sector is second only to ride-sharing when it comes to attracting investment. Investment in on-demand health services is projected to reach $1 billion in 2017, up from only $200 million in 2014. According to Accenture, “healthcare is the fastest growing on-demand sector , representing one-sixth of total U.S. funding from 2010 to 2014.”

Read More

Camera Filters in OpenTok for Web

Despite the fact that filters are used a lot in non-WebRTC video applications like Photo Booth and SnapChat, we haven’t seen many WebRTC applications using these types of filters. This is probably because it hasn’t really been possible… until now.

It has always been possible to apply filters to video streams locally using the OpenTok platform by rendering the video into a Canvas element. The problem with this approach has always been that the person on the other end does not see the filter unless you apply the same filter on both the publisher and subscriber video. This would mean significant CPU load if you are subscribing to multiple participants. It also means that you don’t get to see the filters in the Archives.

Read More

White Paper: Interactive Broadcast & The Rise of Fan Engagement

2_portrait_broadcast-cover@2x

In today’s increasingly fragmented digital world, the way fans consume and engage with sports content has fundamentally changed. While teams may still win the hearts of loyal fans, sporting organizations and broadcasters aren’t capturing their attention like they once did.

To win the hearts, minds and eyes of the new generation of sports fans – who are always online, on mobile and on social – broadcasters are leveraging live video to create all new interactive and participatory fan engagement experiences.

Read More

The Future of Interactive Social Media

facebook-live-reactions-androidAs global access to the internet continues to grow we find ourselves in an increasingly connected world. Never in our collective history have so many people had the ability to access so much information about what is going on in the world around them. This has led to an unprecedented rise in engagement with current events, especially amongst the young people whose voracious appetite to rant, debate and ‘be heard’ has fueled the emergence of so many social media platforms.

Read More

Do 12% of WebRTC calls really fail?

WebRTC logoI was talking with our old friend Philipp Hancke and discussing how it could be possible that 12% of the WebRTC calls were failing.  This number came as a surprise to us as, based on our reports, the number of failures is significantly lower when it comes to OpenTok calls, even though the exact numbers depend on the specific use case you have.

So, we decided to grab some data and try to prove that WebRTC, at least in our platform, is doing a much better job.

Read More