Programatically Adding User to Notification Subscription

Eric Rovtar asked on July 9, 2014 14:39

Hi, everyone!

I'm hoping this is an easy process. I'm looking to be able to programmatically add an authenticated user to a Notifications template.

I'm tried looking through the ContentSubscription WebPart and the CMS.Notifications class, but I can't find a method that allows me to do this.

I also tried looking in the UserInfo object, but couldn't find anything there.

Is there an easy way to do this? Essentially, I want to be create a page with code-behind that can subscribe or unsubscribe the specified user from a Notification.

Thanks!

-Eric

Recent Answers


Brenden Kehren answered on July 10, 2014 08:13

Have you seen the Notifications API documentation?

1 votesVote for this answer Mark as a Correct answer

Eric Rovtar answered on July 10, 2014 08:25

Brenden:

First, I should mention that we're on Version 7 still.

Second, you made me think of something. I was relying on the API examples in the Developer's Guide. I forgot about the online examples built into Site Manager and there is one there that looks to help with what I need.

Thanks!

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on July 10, 2014 10:01

Yes the API examples built-in are very helpful. Let me know if you find what you're looking for.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.