API - Login

Support Center > API Integration

Published 02/18/2014 at 4:18pm UTC

Page viewed 3420 times

Details

How can I have an authenticated user from my website automatically logon to the SecureVideo website?  How does it work once that user's session times out on your site?

Answer

Login API

The Login API is used to allow authenticated users on your website to automatically be logged into the SecureVideo.com application, where they can schedule sessions, add and remove participants, send reminders, install the videoconferencing app, view participant presence, and initiate sessions.  

For the most integrated look and feel, we recommend doing the following:

  1. Request that your API account be set up with the "Limit UI to Launch Panel Only" option enabled
  2. Use the Branding tab under Features to include your website's subdomain, logo, colors, and navigation menu

If you do this, then when your users are taken to our site, it will have a ton of functionality that is already well-tested and would be time-consuming for you to code, yet it will appear to almost every user to still be a part of your website.

There are 2 API methods available in the Login API:

 

Get Login URI

POST https://api.securevideo.com/login/5 (where 5 is the SecureVideo.com User ID)

{
"RedirectToUriOnExpiry": "https://www.mywebsite.com/HandleSecureVideoLoginExpiration"
}

This is a server-to-server call which returns a URI which, when you direct your user's browser to it using javascript's "window.location.href = " or the like, will automatically log her in and redirect her to SecureVideo.com.  Once the user's SecureVideo.com authentication expires, she will be redirected to the RedirectToUriOnExpiry URI that you specify.

The returned login URI will be in JSON, for example:

{
"LoginGuid": "c1a714554134958fda34d32ebb4c070de1579430ba1471ba8d4c0b2b6e8ba8d6",
"RedirectToUriOnExpiry": "https://www.mywebsite.com/HandleSecureVideoLoginExpiration",
"LoginUri": "https://hub.securevideo.com/Account/Login?auto=c1a714554134958fda34d32ebb4c070de1579430ba1471ba8d4c0b2b6e8ba8d6"
}

If you want to cancel the user's login for any reason after you have authorized it, you should retain the LoginGuid and call the Delete Login URI method with the LoginGuid.  Once a user is logged in, there is no way for you to programmatically log them out.

For security reasons, you must perform the redirect within 15 seconds of obtaining the Login URI, and you can only use the Login URI one time.  Users are logged out of SecureVideo.com after 240 minutes of server inactivity.

In order to provide a user with an automatic login, that user must already be a user within SecureVideo.com.  Therefore, the general usage pattern is to create and update the SecureVideo.com user (using the User API) at the time you create and update your website users, and save the SecureVideo.com user ID in your user record.  Then, when it is time to perform the automatic login, you use the SecureVideo.com user ID from the user record to perform the login.

 

Delete Login URI

DELETE https://api.securevideo.com/session/c1a714554134958fda34d32ebb4c070de1579430ba1471ba8d4c0b2b6e8ba8d6 (where c1a714554134958fda34d32ebb4c070de1579430ba1471ba8d4c0b2b6e8ba8d6 is the Login GUID obtained in the Get Login URI method)

Expires the login URI immediately.

On success, this request will return a 204 Status Code, indicating No Content.

 

 

This article was last reviewed by our Support team on April 19, 2017.