does anyone know if it's possible to change a team member's role on Slack via API, e.g. promote user from member to admin?
The docs at https://api.slack.com/methods don't help much. Is this part of their SCIM API offering?
As you already mentioned the basic Slack API does not provide a method for setting the role of a user.
The SCIM API appears to support this feature with PATCH /Users/{id} according to the official documentation. However, I am using the free tier and have no means to verify this.
There might be an undocumented method though, that provides this functionality. Should you find one, I would appreciate it if you could add it to this github repository of all known undocumented Slack API methods.
Related
According to the PRAW manual, you need to specify client ID, client secret, and user agent in order to make a read-only reddit instance. Why is this? You don't need any authentication to look at reddit with a browser; why should it be different if you automate it?
Is this a restriction imposed by PRAW, by the Reddit API, or neither?
Reddit's API access rules state, "Clients must authenticate with OAuth2".
https://github.com/reddit/reddit/wiki/API#rules
Of course there are ways around that limitation, but Reddit is not granting you permission to do so. As a result PRAW 4.0+ enforces the use of OAuth.
With the traditional OAuth API, I can specify the ?hd=<domain> parameter to limit logins to specific G Suite domains. I'm unable to find a way to do this with the googleyolo auto sign-in API.
Is this supported or am I just not able to use the API at this time?
I'm the product manager at Google for this library. This is a good feature request and we have it on the roadmap but no timeline yet. I'll update this answer when it's available, but we've got a ton of great feedback and requests from developers around this library so it might be some time to work through the backlog.
Can I use the REST API to filter out users who have not signed in during the last three months?
(I have admin access if that is needed).
Someone correct me if I'm wrong, but from what I know it's not available out of the box. You would probably need to implement a REST plugin module which would get this data from database (or find an existing plugin that does this - I haven't).
There's a page on Atlassian's Confluence that gives you SQLs to get the last login timestamp for a user (and it seems quite up-to-date): https://confluence.atlassian.com/display/JIRAKB/Retrieve+last+login+dates+for+users+from+the+database
Please note that you would have to think about security when developing such a plugin. I have not really considered this, but there might be reasons to include permission restrictions for such a REST resource.
EDIT: I might have found an API (not REST) that exposes login information without the need to query the database (untested): https://developer.atlassian.com/static/javadoc/jira/reference/com/atlassian/jira/bc/security/login/LoginInfo.html
Unfortunately, the JIRA REST API doesn't provide this resource. The latest supported methods can be found on the JIRA REST API Reference Page.
These methods can be tested on your current installation using the JIRA REST API Browser.
The links above contain all of the info you need on the REST API. If you're still interested in using REST, you can always create your own method for retrieving the user list.
Of course, you could use other methods, like SQL, for example. There are a number of plugins available here.
Where do the Slack default avatars come from? Is it their own service or a 3rd party one?
In either case, is there a possibility for others to use the avatar creation service / system e.g. via the slack API?
I asked Slack directly, and they don't currently offer this in their API:
We don't have an API method or service for it, so there isn't a way to do this, sorry!
They've heard the suggestion, though.
Is there an easy method call one can do to create a user on Meteor using an oauth token provided by a registered service such as Facebook or Google? Intuition says that such a method should exist, where it automatically pulls in details about the user, and adds it to the services field. However, I've poked around the codebase, and am so far unable to find this method.
Thanks for your help.
EDIT: To clarify, I don't want to use the built in Oauth flow, but my own flow - but still end up with a user account the same way as the built in system.
Try meteor add accounts-base accounts-google accounts-facebook accounts-ui. Those packages will do most of the work for you, and then you just need to add the `{{loginButtons}} to your template, and fill in your API information when the easy form asks you to.
EDIT: to roll your own, you might want to check out Arunoda's post on extending Meteor accounts, or maybe a community-contributed oauth package for inspiration.