NativeSubscriptionManagerSetSubscriptionCredentials Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Sets the credentials to use for a category subscription.

Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public void SetSubscriptionCredentials(
	CategoryId categoryId,
	SubscriptionType subscriptionType,
	string username,
	string password
)

Parameters

categoryId
Type: ContentStudio.DocumentCategoryId
The category id.
subscriptionType
Type: ContentStudio.Document.SubscriptionSubscriptionType
The type of the subscription to return. Currently only Newsletter is valid.
username
Type: SystemString
The username. This parameter can be null (Nothing in Visual Basic) or Empty to indicate that no credentials should be used. This value cannot exceed MaxUserNameDataLength characters in length.
password
Type: SystemString
The password. This parameter can be null (Nothing in Visual Basic) or Empty to indicate that no password should be used. If password is null (Nothing in Visual Basic) the password will be set to null (Nothing in Visual Basic).
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
CSPermissionDeniedExceptionThe caller has no permission to perform the requested action
CSInvalidSessionExceptionThe session is invalid
CSInvalidParameterExceptionA parameter has an invalid value
CryptographicExceptionFailed to encrypt the password.
ArgumentOutOfRangeExceptionThe size of the username parameter exceeds its maximum length.
NotSupportedException The value of the subscriptionType is not supported. - or - The type of category represented by categoryId is not supported for subscriptions.
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

WriteContainer permission on the category is required.
Remarks

The password is stored encrypted and encoded in the database and can only be read in clear text by Content Studio.
Note Note
This method is new in Content Studio 5.2
See Also

Reference