Questions about the notifications API - desire2learn

We have a need to fetch notifications for a particular user. By notifications, I mean the "Alert" items that appear in the D2L minibar (Message alerts, Update alerts, Subscription alerts).
We want to integrate some of these items into our CMS' menu.
I see that D2L offers a Notifications API:
http://docs.valence.desire2learn.com/res/user.html#id1
Question 1: Is the notifications API flexible enough to grab the items described above for a user?
Question 2:
To experiment with the notifications API, I tried using the following API call:
http://docs.valence.desire2learn.com/res/user.html#get--d2l-api-lp-%28D2LVERSION-version%29-notifications-instant-carriers-
And a 403 error was encountered.
The documentation states:
These routes depend upon the back-end service having the Notifications tool active. If the service does not have the Notifications tool active, then all calls to these routes will result in authorization (403) error results.
Where is the option in the backend to toggle this setting? Is this setting available in DOME somewhere?
Question 3: For the Alert items, is there a static link to view these items on D2L?
For example, I am able to access the:
Pager - at
example.desire2learn.com/d2l/lms/pager/messageList.d2l?ou=ORGID
Email - at example.desire2learn.com/d2l/lms/email/frame.d2l?ou=ORGID
But, there doesn't appear to be a way to access the "Update Alerts" and "Subscription Alerts" items from a static link. They only appear via AJAX when you click on these icons in the minibar. If I am overlooking where these links are, please let me know.

The answer will be long-ish, and probably isn't what you want to hear. First off, there is a strong distinction between "alerts" (the items that show up in the minibar) and "notifications". The Notifications API is simply exposing the "Instant Notifications preference" table that you can see when you open your user's Notifications settings page (the page at url: http://yourLMS.edu/d2l/Notifications/Settings).
The types of messages that can be sent as a "notification" are the rows in the Instant Notifications table; the "carriers", or endpoints, for them are the columns of checkboxes. The Notifications API exposes this table, letting you retrieve it's current state, and change the setting for a checkbox at the vertex of a notification messageTypeId and a carrierId.
So, to answer your specific questions:
Question 1. No, the Notifications API does not currently provide any access to the alerts that appear in the minibar control in the LMS' web UI.
Question 2. Your 403 may indicate that your calling user context does not have the permission required to use the Notifications tool: the calling user must have a role that grants them the ability to Receive Instant Notifications -- without that, the API call to retrieve the carriers list results in a 403.
If your org has had the Notifications tool turned off entirely, then it's likely no user will be able to see their Notifications setting page through the Web UI, and to turn it back on may require your organization to call D2L's support desk to have it turned back on: I'm not sure that client organization admins have the ability to select what tools are on and which are off without intervention from the support desk.
Question 3. I do not believe there is a static page for the Update and Subscription alert lists.

Related

Sending multilanguage notifications to MS Teams user from a LogicApp

I have a LogicApp that, in some cases, can decide to send a notification to a user via Teams (provided that the target user has installed the associated Teams App).
I was successful in doing so by using the approach presented here.
However, I got stucked when it comes to localize the message.
My first idea was to retrieve somehow the user language settings, but it seems that this info is not available through the Graph API.
Any other idea on how to implement this feature?

How to send user identification when a user interacts with an adaptive card in a Teams Message

We are using the graph API to send a message to the General channel of a Microsoft Team, which has a number of members.
We would like to allow any members to interact with the message via an adaptive card.
This is doable using say Action.OpenUrl or .Submit, however we need to know which user it is which is interacting. I imagine this must be a fairly common thing to do.
What solutions and options are available to do this?
For example, is it possible to obtain the user's Team id at the time an action is invoked ?
Every activity sent to the bot has a from property that identifies the user that sent the activity. You can see the full activity schema here. I advise you to run your bot in debug mode so that you can see all the data your bot receives. If you want to run your bot in debug mode and talk to the bot using Teams instead of Emulator, you can use tunneling: https://learn.microsoft.com/azure/bot-service/bot-service-debug-channel-ngrok

Displaying popup messages/modals with Microsoft Graph

I am currently developing an Outlook Add-In that receives a notification whenever a change in the user's calendar is recorded. The thing is that, there are some occasions where we would change an event's date from the backend by calling PATCH /events/eventId.
It would be very nice if there was any way to notify the user immediately, other than sending an email. Something like a popup modal with a warning message would work very well.
Currently the feature you requested is not a part of the product. We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered, when we go through our planning process.

Will multiple push notifications opt-ins be an issue with iOS?

Quick question, if I develop an app and create a dedicated "alerts screen" and on that screen will be a list of 200 teams, next to each team will be "news" and "transfers".
So the user has the option to opt in to push notifications for only the teams they choose but also narrow down to just news or transfers for example.
Will this be an issue with iOS? I know Parse and others allow "segmentation and channelling" but I am not sure if this is the best way as my app has no user login/registration, I will be doing it via device token.
It won't be an issue with iOS, as long as you plan to support this functionality in your server - once the user chooses the types of notifications they prefer to see, you'll send these types along with the device token to your server and store them in your DB. Your server will send push notifications to each device token based on those preferences.
That being said, a UI screen with 200 options to choose from doesn't seem very user friendly. You should think how to make it less painful for the user to make those choices.

Doing Facebook Requests directly without the built-in UI

I wanted to confirm if this is possible. I want to publish "User To User Requests" directly to the open graph action with my own UI (specifically the friend selector).
My friend selector does follow the platform guidelines (ie do not allow users to select all users at once). My question is that can I publish these requests directly without having to use any of the FB UIs including the request dialog preview (we are going to show our own preview).
This is to be built on iOS. The primary reason we want to use our own UI is because our design team feel that the popups hinder UX on mobile and they want to make it seamless. Their reasoning is a design issue that probably up for another discussion all together, but what I want to know is about using the requests api without using the native FB ui.
The answer is simply, YES, yes you can do this and then post the request to each friend using the id's of the friends selected by the User. All you have to do is just retrieve the friend list retrieve selected user ids and POST to them the requests.

Resources