You can generate a key for a private content item with the generateContentItemViewKey method.
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. |
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. |
Error | Description |
---|---|
not allowed | It's not a private content item, or its isViewedOnce property is false. |
<?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> |
<?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> |