Live Demo

Data Flow Diagram

Step 1

Get API Keys from user:

User's API Key is located in Account Settings > Integrations > User API Key

  • Used to post videos to a user's account

Organization's guest user API Key is located in Account Settings > Integrations > Organization API Key

  • Used to post videos to an organization's account as a guest

Step 2

Get one-time recorder token using your API Key:

Note: Do this server-side so that the API Key isn't transmitted in the HTML.

Operation: POST

URL: https://api.ilosvideos.com/v1/token/record

Content-Type: application/x-www-form-urlencoded

POST Values:

api_key: api key from step 1

service_name: #{{YOUR SERVICE'S NAME}}

  • The name of the service. This is used if the user is sent to the download page. The instructions will say to return to #{{YOUR SERVICE'S NAME}}.

video_endpoint: #{{YOUR ENDPOINT URL}}

  • The URL where a POST will be made when a video is uploaded using the one-time token.

video_endpoint_extras: Array ( [extra key 1] => extra value 1 [extra key 2] => extra value 2 )

  • An array of extra data that will be returned to your video endpoint.

record_single_video: boolean

  • When set to true, screen recorder will only allow recording one video and will automatically close once the video has been uploaded. The new video will not be opened automatically in the user's browser.

video_title: String

  • When record_single_video is set to true, video_title will be used to set the recorded video's title.

video_set_public (optional): boolean or null

  • When set to true, an uploaded video will automatically be viewable by anyone with a link. If set to false, a user must be logged in to your ilos account to view the video. If not set, your user/organization defaults will be used.

collection (optional): String (collection randtag)

  • If collection is set to a valid collection on your account, recorded videos will be placed into this collection automatically.

auto_download_recorder (optional, default = false): boolean

  • If set to true, when a user clicks the record button for the first time, it will download without redirecting to the install recorder page.

auto_authenticate_on_install (optional, default = true): boolean

  • Determines whether a user should be automatically authenticated the first time the recorder is launched after install. If set to false, the user will need to return to their browser and click record in order to be authenticated.

auto_launch_fullscreen (optional, default = false): boolean

  • If set to true, the screen recorder will launch in fullscreen mode by default.

Results (JSON):

worked: boolean

fail_reason: string

video_endpoint: string

video_endpoint_extras: array

video_set_public: boolean

token: string

recorderDownloadUrl: string

recorderLaunchURI: string

recordButtonIframe: string

expires: string

Step 3

Store results:

Store the token that was generated and returned in the JSON response. When a video is recorded using this token, a JSON POST will be made to the video_endpoint specified with data about the video. The "expires" value returned is the UNIX timestamp (UTC) for when the temporary token will expire.

Step 4

Display a record button for the user:

Method 1 (preferred): use the recordButtonIframe. This is an iframe with the src being a page on ilosvideos.com. This allows us to check if the recorder is installed on the user's computer. If not, the record button will instead be a download button linking to the download page

Method 2: Using the recorderLaunchURI value from the JSON response

Step 5

Wait for a POST on your video endpoint:

After a video has been recorded using the one-time token, the following data will be sent via a POST with JSON:

token: Token the video was uploaded to (the one-time token returned in step 2)

randtag: Video's unique ID

videoURL: URL to view the video on ilosvideos.com

embedURL: URL that an iframe would use as SRC

iframe: iframe containing the embedded video

video_endpoint_extras: Any extra key/values sent in step 2,

NOTE: You can view logs for POSTs to your video endpoint under Account Settings > Integrations > API Log

Did this answer your question?