Does Slack provide API access to Slack's avatars? - slack-api

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.

Related

How to publish to pub/sub with just an api key

I need to publish messages to GCP Pub/Sub with a POST request as the platform I'm using (Zoho) does not allow for any of the GCP libraries. I'm not sure how to make the request in a simple way, as the normal authentication system seems complex.
Is there an easy way to publish a message using, e.g., an API key?
Alternatively is there a simple way to create an API endpoint within GCP that I can then forward data on to the messaging system?
I have used the python client to publish to Pub/Sub, but cannot make POST requests because of the authentication issues.
Both of your questions will have the same answer, yes, and Google Cloud Endpoints is your way to go here.
With Google Cloud Endpoints you can create a custom endpoint and use API keys to authenticate the requests that are being done. There's a really good how-to guide from medium you can follow in order to set up your endpoint and your Pub/Sub push subscription.
More information about creating push subscriptions can be found in the public documentation.

Why do you need OAuth for a read-only reddit instance with PRAW?

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.

How do I change team member role on Slack via API?

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.

How to post information to Eloqua, by calling Eloqua API from a class

I don't know much about Eloqua or oAuth, I wanted to know How to create a service to connect to Eloqua and call API
The documentation for Eloqua oauth is here: http://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAB/index.html#Developers/GettingStarted/Authentication/authenticate-using-oauth.htm
This is the documentation for the bulk api: http://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAB/index.html#Developers/BulkAPI/bulk-API.htm
You can start by using a rest client (like postman or fiddler) to play with the API.
Is there anything specific you want to achieve?
I have to write an answer because my reputation is too low to comment...
You can not create a user via REST API or Bulk API. Maybe with SOAP but it's deprecated.
See all endpoints for users here.
Your question is not clear:
What do you call a "service" ?
What do you want to achieve ? And how ?
Does OAuth is mandatory ?
And finally, with REST API you can not connect and then executes your actions, you have to authenticate you each time you call an endpoint. You are probably aware of this, but this may seems unclear in your question.

Can I obtain the last session time of all Jira users using the REST API?

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.

Resources