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.
Parameter | Type | Description |
---|---|---|
credentials (required) | credentials | Read the description of the Credentials object. |
contentItemId (required) | string | ID 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) | string | Invitation text added to the e-mail. |
autoAddPermissions(optional, default: true) | bool | If true and a user/group has no permissions to view the given content item, these permissions will be added automatically. |
After the request has been completed, the system returns an object with the following properties:
Parameter | Type | Description |
---|---|---|
success | bool | True if the invitations have been sent successfully. |
usersWithoutPermission | string[] | An array of user IDs who have no permissions to view the given content item. |
groupsWithoutPermission | string[] | An array of group IDs which members have no permissions to view the given content item. |
<?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> |
<?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> |