How Does my Application Authenticate with BlueJeans?

You may have written a cool application, Cool App, that needs to do BlueJeans-y things on behalf of its users. Put another way, your application wants to be a BlueJeans concierge for its users.

This step by step guide will provide you with an example of how to create Client authentication keys and use the onVideo REST API's authenticate and receive an access token.

Things to keep in mind...

  1. BlueJeans REST API messages must contain certain formatting values in order to be recognized as valid. Please ensure that each REST call has the following fields:
    • http header: accept: application/json
    • http header: content-type: application/json
  2. Your application must have Enterprise Administrator rights in order to function on behalf of other users.
    • The Authentication Keys are generated from the BlueJeans Administrator Portal

Step 1

Creating Keys

From your BlueJeans Administrator

The first step to enabling your Cool App to call BlueJeans API's is for it to Authenticate. BlueJeans refers to this type of authentication as client authentication.

Client Authentication requires two unique strings that are uniquely associated with your application. You should treat securely these strings to prevent malicious applications from gaining access to BlueJeans

Navigating the Bluejeans Admin Portal
(Mouseover images to zoom)

Select Admin Functions

Login to the BlueJeans Web Portal using an Enterprise Administrator's account. Click on the Admin link that appears on the menu running across the top of the page

(Mouseover images to zoom)

Goto OAuth Section

From the Admin page, select the OAuth link to get to the page which manages the Authentication Keys

Create the Keys for Cool App
(Mouseover images to zoom)

Create Keys for New App

Click on the button Add New App to start entering information about your new Cool App

(Mouseover images to zoom)

Enter basic information about App

We will be entering into these BlueJeans fields the information to create OAuth Client keys for your Cool App application.

  • For the Application name field we are going to give it the value Cool Application. This is just the title of the key entry in BlueJeans.
  • In the Description field enter something that will help you and any other Enterprise Administrators recall what the application does.
  • The field, App Key, should be a name readily identifiable with your Cool App. It is also one of the OAuth keys that a BlueJeans Enterprise Administrator must provide to the Cool Application administrator. In this example, we'll set the App Key to coolapp.

Click on the Save button when done.

Sending OAuth Keys to Cool App
(Mouseover images to zoom)

Copy Keys to Send to Cool App Administrator

The BlueJean Admin portal will have listed in its collection of OAuth applications, an entry for your Cool Application. There are two fields contained in this entry that you need to copy and forward to the Cool App adminstrator. They are:

  1. App Key - This key is passed in the Client Id value when making the OAuth API call from Cool App.
  2. App Secret - This key is a long unique identifier and is passed in the Client Secret value when making the OAuth API call from Cool App.

Step 2

Authenticating

Create a Concerige-Session

The next step is to make the API call to authenticate with BlueJeans using the newly created client keys and create a concierge session.

When an application authenticates, the BlueJeans cloud returns something called an access token which becomes your software passkey to call API's.

BlueJeans uses the industry standard OAuth protocol for authentication.

API Specification
https://api.bluejeans.com/oauth2/token?Client
JSON Calling Parameters
{
  "grant_type": "client_credentials",
  "client_id": "coolapp",
  "client_secret": "4cb3711286b74b43a189da95a347b6fc"
}
				
The function of the JSON variables are:
  • grant_type - string constant, "client_credentials" to designate the type of authentication method
  • client_id - the value in the App Key field of the OAuth entry provided by the BlueJeans Adminstrator
  • client_secret - the unique value contained in the App Secret field of the OAuth entry provided by the BlueJeans Administrtor
JSON Return Values
{
  "access_token": "7db847d4fcb04f79982d9fa776592a31",
  "expires_in": 3600,
  "scope": {
    "enterprise": 28663,
    "partitionName": "z2",
    "partition": {
      "id": 2,
      "name": "z2"
    }
  }
}
				
The returned JSON variables are:
  • access_token - this is the time-bound software "passkey" that is required when making BlueJeans API calls.
  • expires_in - this is the duration (in seconds) for the access_token to remain value.
  • scope - this Object contains information related to the breadth of access that the access_token can engage.
    • enterprise- this is the ID number for the unique collection of users for which this OAuth key will authorize use of Cool App.
    • partitionName - this is a BlueJeans internal reference
    • partition - this JSON is also BlueJeans internal information
CURL
curl -X POST "https://api.bluejeans.com/oauth2/token?Client" -H "accept: application/json" -H "content-type: application/json" -d "{ \"grant_type\": \"client_credentials\", \"client_id\": \"coolapp\", \"client_secret\": \"4cb3711286b74b43a189da95a347b6fc\"}"