Generating a Key for Private Content

You can generate a key for a private content item with the generateContentItemViewKey method.

Parameters

Parameter Type Description
credentials (required) credentials Read the description of the Credentials object.
contentItemId (required) string ID of a private content item, for which you want to generate a key.

Retun Value

After the request has been completed, the system returns an object with the following properties:

Parameter Type Description
viewKey string Generated key for the specified private content item.

Possible Errors

Error Description
not allowed It's not a private content item, or its isViewedOnce property is false.

Sample Call

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GenerateContentItemViewKeyRequest xmlns="http://www.articulate-online.com/services/api/1.0/">
      <Credentials>
        <AccountUrl>http://myaccount.ispringonline.com</EmailAddress>
        <Email>email@email.com</Password>
        <Password>password</Password>
      </Credentials>
      <ContentItemId>1234</ContentItemId>
    </GetAccountNameRequest>
  </soap:Body>
</soap:Envelope>

Sample Response

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GenerateContentItemViewKeyResult xmlns="http://www.articulate-online.com/services/api/1.0/">
      <ViewKey>1234</ViewKey>
    </GenerateContentItemViewKeyResult>
  </soap:Body>
</soap:Envelope>