Lloyd | 2019-05-20 04:24:10 UTC | #1
I'm using PureCloudPlatform.Client.V2 (58.0.0) & am attempting to build a console application that will receive notifications of activity within PureCloud and allow me to trigger actions externally.
I've created an OAuth account in Purecloud, and successfully generated my token and have verified this by querying the TelephonyAPI for Edge server details.
I'm now trying to subscribe to the Notifcations API for Presence, Conversations and eventually (Ideally) Queue updates.
I'm following the example from the .Dot home page. https://developer.mypurecloud.com/api/rest/client-libraries/dotnet/index.html
I'm at the AddSubscription stage handler.AddSubscription($"v2.users.UserGuidGoesHere.presence", typeof(UserPresenceNotification));
However, when I attempt to add my Subscription, the IDE is returning that the namespace 'UserPresenceNotification' could not be found and that I might be missing a directive or assembly reference.
- The Same error is returned for 'ConversationNotification' as well
My references are:
using System; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System.Collections.Generic; using System.Linq; //PureCloud API using PureCloudPlatform.Client.V2.Api; using PureCloudPlatform.Client.V2.Client; using PureCloudPlatform.Client.V2.Extensions; using PureCloudPlatform.Client.V2.Extensions.Notifications; using PureCloudPlatform.Client.V2.Model;
Can anyone point me in the direction of what I may have missed please?
tim.smith | 2019-05-20 14:10:03 UTC | #2
Looks like the example wasn't updated when the notification classes were renamed. I'll be sure that gets updated. The class you're looking for is PresenceEventUserPresence, and you can find all the classes to use in notificationMappings.json.
Lloyd | 2019-05-20 21:26:06 UTC | #3
Fantastic Tim - Worked perfectly, thanks!
system | 2019-06-20 21:26:10 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 5187