Play content via authenticated play links

Play content by generating authenticated play links and embedding the Go1 Player in your application.

Overview

This guide outlines how to enable your users to seamlessly access and play content in your application by generating authenticated links to Go1 content via the API. An authenticated link is a one-time login URL that can be generated for each unique user. These links are used to log your users directly into a session of content within the Go1 Player interface. Each URL you generate can be embedded or linked to directly from your application, providing a seamless journey for your uses to open and play Go1 content.

An alternative method to access and play Go1 content in your application is to retrieve Go1 content objects as SCORM packages - see Download & play content as SCORM. We recommend using SCORM if you already have a SCORM player in use - as Go1 SCORM packages will handle user authentication and completions built-in. Otherwise, if you do not have a SCORM player available, continue reading this guide to learn how to play content via authenticated links.

How it works

This method of accessing Go1 content works by logging individual users directly into the Go1 web application (the Go1 Player) to access and play a learning object. All Go1 content (learning objects) are accessible on the web at our 'Go1 play URL'. This URL has the following schema - example.mygo1.com/play/<lo-id>.

For a user to access Go1 content via these links, we require that the user must be authenticated (logged in) to the Go1 web application. This will track the progress and completion of any learning in Go1 content against the user's account.

Typically a user would need to input a user name and password to log in and access Go1 content, however, the Go1 API provides a simple solution for integrations to generate a one-time login URL, that can be used to authenticate the user without them needing to manually log in.

In the implementation steps below, we'll cover how you can generate these one-time login links for your users, to surface access to Go1 content within your application.

Preparation
  • Before you can implement the steps outlined below, your API credentials will need to be granted access from Go1 to use the user.login scope. This scope is not enabled for integrators by default, please contact your Implementation Manager or support@go1.com to be given access to this scope.

Implementation steps
Step 1. Generate an authenticated play link via the API

An authenticated play link is a one-time login URL, which can be retrieved from the API, for any given user, authenticating them into any given learning object. To retrieve the one-time login URL to access a learner object, make a POST request to /v2/users/<user-id>/login?redirect_url=/play/<lo-id> .

In the request, you will need to supply the following details:

  • user-id, the Go1 user id for the user who is being authenticated into the Go1 player to access the learning object. Before you can surface Go1 content to a user (by logging them into the Go1 player), the user must have an existing Go1 account. To create a Go1 account via the API, make a POST request to the /v2/users endpoint - see the API Reference documentation. After successfully creating a Go1 account, you will be returned the user-id, which you can then store against the user and utilise when generating your one-time login URL.
  • lo-id, the learning object id for the content the user is accessing. Before making the POST request to retrieve the one-time login URL, you will need to know which learning object to log the user into. We recommend familiarizing yourself with the Discover content concepts to understand how learning objects are retrieved via the API. It's likely at this stage of your integration, you will have context of the learning object the user is trying to access and will have the lo-id stored against that object in your application.

Example request:

curl --location -g --request POST 'https://api.go1.com/v2/users/<user-id>/login?redirect_url=/play/<lo-id>'
--header 'Authorization: Bearer <CUSTOMER-ACCESS-TOKEN>' \

A successful request will return the one-time login URL, see example response below:

{
  "url": "https://customersportal.mygo1.com/p/#/one-time-link?token=1:1234567:abcd-efgh:customersportal.mygo1.com/play/{LOID}"
}

After retrieving the one-time login URL from the API, you can load the returned URL either in an iframe or a new window/tab within your application. To the user, it will appear as if they are seamlessly access the Go1 object from within your application.

Remember, that the link will expire after a single use, and is for a single Go1 user. You will need to implement a system to generate one-time links for each individual user each time they attempt to access content from your application.

Optional. Configure the Go1 Player

The Go1 player has various properties that can be configured, such as; setting an exit state upon completion of content, the ability to show/hide the player header and sider bar panels, the ability to remove the exit button, etc. For more information and a full list of customisable properties, see Configure the Go1 Player.