Link to training

This version of the API docs is depreciated and will be taken offline soon.
Please migrate to the new version as soon as possible to avoid service disruption.

New version can be found at https://docs.wceaapi.org/

Provides a direct authenticated link to a particular training

This uses the same endpoint as User - Get Authentication, except the endpoint takes a couple of extra parameters context and context_id.

Once a link has been generated, the link can be presented to the user to click on, and the user will be directed straight to the training without requiring to log in to the portal first.

Request

  • HTTP Verb: GET
  • URI: /user/{id}/authentication?context=training&context_id={training_id}

Query Parameters

  • id: user identifier. It could be either user id or user email.
  • training_id: training identifier.

Response Properties

accessLink link that may be used to access the training
token hash that performs the authentication
expiration time limit for the authentication token. After that time the token becomes invalid

Request example

$API->getUserAuthentication('adrian.perez@wcea.education',
array(
  'context' => 'training',
  'context_id' => 123456,
));

Output Example

array(
  "accessLink" => "http://dmc.wcea.education/auth?login_token=feb815ad2906bce7d85d38bdf8a3928f&redirectTo=http......",
  "token" => "feb815ad2906bce7d85d38bdf8a3928f",
  "expiration" => "2013-11-21 14:42:43"
)