Exclude bot users from slack search api results - slack

In the slack UI, when I make a search, it makes a request to the search.modules endpoint. There's also the option to exclude apps and bots from the result, which translates to a boolean POST param to that api endpoint.
https://api.slack.com/methods doesn't list such a method, and only has search.messages, search.files, and search.all.
How can I use the API to search, but exclude bot accounts? Do I need to leverage this seemingly hidden search.modules (which probably is inaccessible with a bot acct)? Is there a better way than making a list of bots and manually filtering them out of search results?

Well it's not in the documentation anywhere, but I can achieve this with the search.messages api by adding search_exclude_bots=True to my POST data.
Since this is undocumented, I'm curious as to whether users should be using this param and if it will be changed in a breaking way in the future.

Related

Getting messages per subaccount using the Mailchimp API

I was looking at the Mailchimp API documentation because I want do an implementation where I list all the messages per subaccount. This doesn't seem possible. You get all the messages from every subaccount. Same if you use a webhook. The subaccount API options seem very limited.
I'm using the Mailchimp Transactional PHP lib. I tried using the messages->search() method where I set senders param but that doesn't really capture everything linked to the subaccount. It would be great if you could add a subaccount param to the messages->search() method. You can filter afterwards by looping through every result and checking the subaccount but that seems like a crappy workaround.
Anyone have another workaround? I see there is no way to report bugs or feature request on their Github? Or know how to contact the developers?

Mailchimp Dynamic Content: add customized link in subscribe email

We want to start a service with Mailchimp where every subscriber will get a customized link in the email she receives. The Subscription Form will be on a wordpress website (not my decision).
There is a pool of thousand of links with a unique parameter, which we have stored on our webserver, like these examples
https://example.com/link?code=a25b1d085f3aec4b256
https://example.com/link?code=32219abb336de28a103
etc
Every code parameter should only be used once and should be kept as secret as possible. So I don't think it is a good idea to send the code from the form to mailchimp in a hidden field.
I don't know, if this is possible. Is Mailchimp even the right tool to do this?
I'm not sure, where to start the journey.
I don't think webhooks will help me here, as those are only one-way communication without a backwards channel, as far as I understand.
I checked the Mailchimp API documentation, but I might be too foolish to understand, which of the multiple options I need to use.
I found this answer here: https://stackoverflow.com/a/53096852/476951, but I don't know, if this will suit my needs. As I understand it, this will chhange the mail template in Mailchimp UI with an API request and store it. The successive emails will all use this changed template until I change the template again. This seems not to be the correct way.
So, here are the two workflows that might be possible, but I don't know if they are.
Have a form created in Wordpress (not the embedded Mailchimp form), and create a custom form handler with admin-post.php like described here. Then use the API to send the email through the Mailchimp service with my dynamic link in it. But how. Every tuorial I found sends campaigns via the API, not individual mails to single recepients
Somehow manage Mailchimp to get the dynamic content via some sort of webhooks or the likes.
Is any of these workflows suitable to do this?
If yes, who should I set these up?
Is there anything else I might have missed?
Edit
Or do I need to use Mailchimp Transactional Email service (former called Mandrill)?

List all Play subscriptions

Is there any API or script to get back a list of all live Google Play subscriptions for a given app? ie a data form of what's shown on the Play developer console under Subscriptions.
Stripe, for example, has an explicit list subscriptions API, but I can't find the equivalent for Play.
UPDATE: Since writing this, I've enquired to official sources and I can confirm there is indeed no API to retrieve all of your subscriptions. Certainly surprising, but that's where it stands.
As described in the documentation on the device you can use the getPurchases() method returns live subscriptions.
On the server there is the Google Developer API Purchases.subscriptions REST Object.

Dart googleapis 0.35.0 - Google Drive API v3 - fields request parameter

Google Drive API v3 documentation:
Full resources are no longer returned by default. Use the fields query parameter to request specific fields to be returned. If left unspecified only a subset of commonly used fields are returned.
Either there is a fields request (query) parameter in the googleapis Dart library (which I can't find) or the library is useless for Google Drive API v3. Or maybe a workaround?
Looks like the fields need to be added to the URL
https://github.com/dart-lang/googleapis/blob/571f592976b7cf557d94bd0fc61b412fc1087446/generated/googleapis/lib/drive/v3.dart#L87
https://developers.google.com/drive/v3/web/performance#partial
https://www.googleapis.com/demo/v1?key=YOUR-API-KEY&fields=kind,items(title,characteristics/length)
I believe it means that some HTTP requests (in the underlying web api) require a additional ?fields='...' parameter to know what fields to include in the response. That documentation page helpfully gives a list of fields but does not say which requests require the parameter.
I personally find neither the Google api pages nor the Dart Google API libraries documentation to be very helpful, however, the Google OAuth Playground allows all the apis to be executed and tested. I used this tool to figure out what inputs are required for each web request and to make sure my Dart code was getting expected results.
Edit:
Every request in the api MAY include a ?fields='...' parameter, but don't have to.
If left unspecified only a subset of commonly used fields are
returned.
So depending on what you are doing you may not need to specify it.

Google Web search API (not custom search)

So google pulled the SOAP API back in 2006, and depreciated the REST API last year. Even though the REST api still works fine, I was wondering if anyone here knows an alternative for the web search. I am not talking about Custom search API (that thing is horrible with a 100 queries/day limit).
Also, I am currently using the REST api for a custom application. I have noticed mixed (and very unreliable) results if I pass search operators such as inurl: or site: with my queries. Does anyone know if these even work with the REST Api?
The search parameters do work for Googles deprecated REST API. But search results often do not equal the ones from a regular Google search. Most likely because the two do not (and never will) use the same data index.
YAHOOs BOSS could be a (non-free) alternative
Microsoft does offer a simple and free restful API for BING

Resources