RingCentral integration with event subscriptions for individual users - ringcentral

I have an application that we are going to integrate with RingCentral. I'd like to get event subscriptions for each individual logged in user, so that the application can respond to call events specific to the individual user that's logged in.
What is the best approach to accomplish this?

Here's some info on how to do it quickly. I'm not sure if it's the best way, but it seems pretty simple to me. You'd simply call the endpoint (https://platform.devtest.ringcentral.com/restapi/v1.0/account/accountId/call-log
), pass through a tilde for accountId, and you'd get the call log for the logged in user.
https://developers.ringcentral.com/api-reference/Call-Log/readCompanyCallLog has a lot more details.

Related

AWS Cognito end user sessions on all devices

I have an application and I use Cognito + Identity provider to use google accounts as my users. In Cognito, I have several groups, and in my application itself admin users can add users to groups, remove them from groups, and so on. The thing is, for these changes in the user to be reflected, the affected user needs to logout and in again in the application.
Having a new token fetched on every page load/request does not seem like a good practice. Therefore, I was looking for a Cognito function that would allow me to log a certain user from all it's active sessions. I looked for functions such as logout and revoke, but they require that I have the affected user's access token - which I obviously don't. After that I started playing around with other functions that could have the same effect, such as AdminForgetDevice - I thought that by forgetting a device maybe Cognito would log you out, but that is just used for 2FA, which my application doesn't support.
Seems to me a pretty basic thing what I'm trying to do, and kind of impossible to think that Cognito doesn't support it. Am I asking the wrong question? Is there an endpoint to accomplish this, or a different token-retrieval approach that I should use? I just want to make sure that if a user's groups were changed, those changes reflect immediately. My approach right now is forcing all that user's sessions to end.
I reached out to AWS support asking about this, and their official answer is that Cognito has no action to end all sessions of a specific user immediately. But I came to a solution on my own. You have two options:
1. User global signout and wait 1 hour until the user session is expired.
Not a fan of this solution. If you removed access from a user, makes no sense that the user can still use their old permissions for an hour.
2. Make your interface aware that the user should be logged out and use the logout function
This is the approach I'm going with. The moment an administrator changes a user's permissions, I am creating a notification for that user. The interface, once the user accesses it, know that there have been changes to that user because of the notification. The interface, then, in possession of the user's accessToken, can simply call the logout function.

How do I remove a Facebook app notification from the app?

If I post an app-to-user notification as per the docs (https://developers.facebook.com/docs/reference/api/user/#notifications), it does only have a 'Create' section in the docs, but I'm just wondering if there is any way I can then remove them, like you can with apprequests (https://developers.facebook.com/docs/reference/api/user/#apprequests)?
We're building a game which allows for random-user play, so need app-to-user communication, but don't want to use an app-to-user apprequest because they don't get notifications. But with app-to-user notifications, they clutter up notification list if you're not able to delete them from the app.
I know in you can call https://graph.facebook.com/me/notifications/, but you need the 'manage_notifications' extended permissions for that, which then gives you access to all your notifications, which we think is overkill and unnecessary.
Is there any other way?

IS there any Django app that notify the user about something that happened in your web, and ask him to perform an action?

I mean, there's any generic app that you can use to make notifications like when in Facebook, someone adds you as friend, or invite you to an event?
Basically, I need to show to the user this type of notification for different contents type, with the possibility to do some custom actions (ignore, accept, etc) different for each one.
I wonder if someone have done this before, so I can plug it and create a type of notification simply passing the text of the notification, the options that must show and the views to call for each option.
Thanks.
django-notifications is a GitHub notifications alike app, and it's based on Django Activity Stream.
If you familia with django-activity-stream, the the usage of django-notifications almost the same.
django-notifications also provide notifications_unread templatetag to display unread notifications of current login user.
Django Activity Stream does this, for the most part. It's a generic relationship manager that watches for save events in the datbase, and when a condition is met it puts an "event happened!" record into its own tables.
It would be incumbent upon you to then present that feed of events to the user, along with links to the actions (specific to your project) that you want him to take.
Even if it's not what you want, it's an excellent example of how to start.
Maybe this is more closer to my needs:
django-notification
https://github.com/jtauber/django-notification
any experience with that?
There is also django-notify: http://code.google.com/p/django-notify/

How do you handle authentication with Orbited?

I'm trying to make a site where users can create accounts then chat with each other in real time using Django, Orbited, and Twisted. I want it so that two users individual chats are private and only they can see it.
Based on my knowledge of Orbited(which is limited since it seems like the site is down, so I've just been going off of blog posts and whatnot), there are channels that basically anyone can subscribe to and get the messages sent to it. Since the subscribing is done through Javascript, it would be easy for someone to just change what channel they're subscribed to and subscribe to someone else's private chat and see what they're saying.
So how would you get around this and have some kind of authentication in Orbited's channels? I've been looking around and most people cite Hotdot as an example, but it's not extremely documented so it's hard to understand. It also seems like it just checks for authentication before allowing you to subscribe to anything, but once you're logged in you'd still be able to subscribe to any channel you want.
a dirty way is to do this:
since sessionids are unique to each logged in user, you can create a unique id for each chatsession and attach the sessionids of the users to that.
then let your channel-name be /messages/{sessionid} or something similar and your users subscribe to that channel
whenever you want to push messages, just push to all /messages/{sessionids} attached to that chatsession
for a better solution, you should try the orbited discussion group: http://groups.google.com/group/orbited-users
it is still alive ;-)

List all Alerts within a SharePoint site without using the SharePoint API?

Is it possible to get a list of alerts for ALL users within a given site? After messing with the GetAlerts method in /_vti_bin/Lists.asmx, it seems it always executes in the context of the user who provided it with credentials, and will only return the Alerts for THAT user. I was hoping to get a list of EVERY alert within the site.
I know I can probably do this via the SharePoint API in a console app but was hoping to use web services or another method that didn't require direct access to the SharePoint box.
I guess the other method would be to write a custom web service... but I was hoping for something quick and easy.
I think you have answered your question. There is no easy way, only custom coding is left.
Couldn't you use the _vti_bin/sitedata.asmx GetListItems (it allows you to send CAML) method to retrieve alerts and just run the call to the service as the application pool's identity, that should retrieve all items, since the application pool identity is the system account for your site collection....