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

Parameters

ParameterTypeDescription
credentials (required)credentialsRead the description of the Credentials object.
contentItemId (required)stringID 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:

ParameterTypeDescription
viewKeystringGenerated key for the specified private content item.

 

Possible Errors

ErrorDescription
not allowedIt's not a private content item, or its isViewedOnce property is false.

 

Sample Call

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <GenerateContentItemViewKeyRequest>
      <Credentials>
        <AccountUrl>http://myaccount.ispringlearn.com</AccountUrl>
        <Email>email@email.com</Email>
        <Password>password</Password>
      </Credentials>
      <ContentItemId>1234</ContentItemId>
    </GetAccountNameRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response

 

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
    <GenerateContentItemViewKeyResult>
      <ViewKey>1234</ViewKey>
    </GenerateContentItemViewKeyResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>