Page tree
Skip to end of metadata
Go to start of metadata

You can invite a user to view a content item with the inviteUsersToContentItem method.

Permission to run the request: Account Owner, Administrator, Organization Administrator, Publisher.

 

Parameters

ParameterTypeDescription
credentials (required)credentialsRead the description of the Credentials object.
contentItemId (required)stringID of the content item you want to invite users to.
users (optional)string[]Array of IDs of the users who will be invited to view the content item.
groups (optional)string[]Array of group IDs which members will be invited to view the content item.
emails (optional)string[]Array of email addresses to send invitations to (available for public content only).
invitationMessage(optional)stringInvitation text added to the e-mail.
autoAddPermissions(optional, default: true)boolIf true and a user/group has no permissions to view the given content item, these permissions will be added automatically.

Return Value

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

ParameterTypeDescription
successboolTrue if the invitations have been sent successfully.
usersWithoutPermissionstring[]An array of user IDs who have no permissions to view the given content item.
groupsWithoutPermissionstring[]An array of group IDs which members have no permissions to view the given content item.

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>
    <inviteUsersToContentItemRequest>
      <credentials>
        <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
        <email>email@email.com</email>
        <password>password</password>
      </credentials>
      <contentItemId>1234</contentItemId>
      <users>
        <id>1</id>
        <id>2</id>
      </users>
      <groups>
        <id>1</id>
        <id>2</id>
      </groups>
      <emails>
        <email>user1@email.com</email>
        <email>user2@email.com</email>
      </emails>
      <invitationMessage>Invitation Message</invitationMessage>
    </inviteUsersToContentItemRequest>
  </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>
    <inviteUsersToContentItemResult>
      <success>True</success>
    </inviteUsersToContentItemResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  •