Twilio programmable custom voice call - sms

I've recently started to use Twilio, for our own needs - we need to provide users with real-time informations about possible dangerous events that might have happened at their home, through SMS or Voice call.
I've tried to use VoiceCall exactly as it's specificied here - https://www.twilio.com/user/account/developer-tools/api-explorer/call-create. The scenario is that I want a robotic voice to explain what was happened, hence I need to generate the xml file for voice on demand. I supplied my own RestApi url for the voice, that is able to generate this file through TWIML.
By default Twilio, will use that url to fetch the audio and other instructions, at the moment when the call is performed. Since the voice URL cannot contain parameters (because they got cut off for some reason) (e.g YES - http://mywebsite.com/api/sayVoice, NO - http://mywebsite.com/api/sayVoice?eventId=1), you will ALWAYS get the same audio (no way to identify a different kind of event and generate a DIFFERENT xml output (for a different audio to the end user).
In Twilio documentation examples, they have only static URLs as well, without extra parameters, hence is that indeed the only way Twilio Call Api can be used?
It's hardly believable that such an use case was not planned for Twilio.
Did anyone tried to use Twilio for a similar scenario?
Any suggestions regarding similar technologies for the same purpose?

Found the issue in the end, you need to pass the parameters as RequestParams.
For example, this one will work - Url=http://mywebsite.com/api/twilio/sayVoice?eventId=379, while pathParam won't work Url=http://mywebsite.com/api/twilio/sayVoice/379.
Hence, stay safe and use RequestParams.

Related

Get Slack channel where app is integrated

I might be missing something really simple but don't seem to find the solution.
I have created a quick and simple app which is meant to do some processing every morning and then send some logs to Slack.
I have been perfectly able to do so using Incoming Webhooks. Cool. The "problem" is that it requires me to set it up from the app settings (aka it obviously makes me define a specific channel for the Webhook so I can have the specific URL) and that's something I like a bit less.
I thought it'd be easier if I can just add/integrate the app on a channel using the Slack UI so I don't have to worry about having to know beforehand the channel(s) ID where the message has to go to and also any other user would be able to integrate in any other channel they consider.
I have integrated it on my testing channel (all good) and tested chat.postMessage (all good) but it still needs the channel (obviously). However, using conversations.list lists ALL channels and that's the opposite of what I'm looking for.
I need a way of getting just those channels where the app is integrated so I can post the message to those and only those.
Is this something that Slack doesn't allow or I'm just missing something very obvious here?
I hope it makes sense and someone can shed some light on this :)
You can use users.conversations method to get list conversations the calling user/bot may access.
https://api.slack.com/methods/users.conversations
Use Bot token to call the API.
Use type argument to search public, private, mpim & im conversations
https://api.slack.com/methods/users.conversations#arg_types
Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im

How to embed audio in Slack via API?

We want to be able to embed an audio file in a Slack chat via the web API.
So far I managed to files.remote.add but that's just an external link.
Then I tried files.upload and share it to a channel, it does embed and play right inside Slack, but for us it's a suboptimal solution, as users can easily download the file, which is against our requirements.
Is there another way to achieve this?
PS: I've read almost all the documentation, there doesn't seem to be an audio or media block type, although I've seen examples that cite a file block type which is neither documented in the API and it's not defined in Bolt. (at least there are no type definitions for it for typescript)
It's not currently possible to embed a media player (audio or video) via the API. We're constantly tuning our APIs, if you have a specific use case in mind, would you mind writing in to feedback#slack.com and we'll get it logged. Thank you!

Can you use multiple ad SDKs with SKAdNetwork?

I am using Facebook ads, Google ads, and an MMP for other networks. I just need to track installs as conversions. I do not serve ads in the app.
My MMP is saying that you cannot have multiple SDKs sending info to SKAdNetwork because it will post back inaccurate information. I have not read this anywhere else.
It says you should only have one SDK posting conversions to SKAdNetwork.
Screenshot of MMP's Blog post saying this
My question is do I need to remove or disable Facebook and Google's registration to SKAdNetwork within my app so they don't post conversions to SKAdNetwork?
OR
Is it ok that all 3 SDKs post to SKAdNetwork?
You technically only need to send one conversion value update and there will be some side effects if you send more than one (though if you handle all your app specific use cases then this might not matter).
Apple will send SKAN CVs to each of the networks you are using for optimization purposes so you shouldn't need to worry about that. I'd personally recommend that you streamline your own app flow to handle SKAN postbacks directly to Apple once.
SKAN 4.0 might make it more difficult if you send multiple CVs from different parties. The new features around multiple postbacks can now get sent to the ad networks based on cohort date and this could affect the optimizations that each of the ad networks use.

Yammer does not return every message in group

Using the following endpoint with the group id and the older_than paging parameter
https://www.yammer.com/api/v1/messages/in_group/[group_id].json?older_than=[msgid(19)]
This does not return every message in that group... it skips messages!
This is a paid network that I am testing, the API is pretty much useless if it does not provide all the messages. Can anyone confirm this limitation!
Using the 'older_than' parameter to try to get all messages isn't going to work:
Reference https://stackoverflow.com/a/19107426/4099849
If you attempt to iterate over messages you will hit some limits. These limits are technical in nature and you would need to revert to the search API to find much older messages. Unfortunately you will have to put up with these limitations if you are dealing with the free version of Yammer as the data export is only available with the paid version.
Assuming you're trying to do some sort of analytics, have a look at the Yammer Data Export API.
There is a similar question : Yammer API - missing messages
The ansnwer is the same and his not acceptable !
When using /api/v1/messages/about_topic/ I get messages not returned by
/api/v1/messages.json
or
/api/v1/messages/in_group
My script respect the API Rate limits and the missing messages are not older than others.
There is something wrong in the API and it must be fixed.
My company is paying for Yammer and expect a reliable API.
If you want all messages inside a group,use below mentioned REST API without all parameters.Then it will list all messages present inside that particular group.
https://www.yammer.com/api/v1/messages/in_group/[group_id].json

How to fill out AJAX form programmatically and scrape results?

Basically, I want to use the Facebook Ads Manager Tool to estimate the number of users targeted by a particular set of targeting parameters. I know there is a published API available, but it is only usable if you are on their advertising application "whitelist." I am sure what I am asking is possible. Plus, it would be interesting to learn more about scraping.
Facebook's Ads Manager Tool is basically an AJAX UI for their ads API. In the process of creating a campaign, you can specify targeting parameters, and the page will dynamically report the number of users targeted as you modify the parameters. From what I've read on the web and here on stackOverflow, it is possible to use Firebug or a similar tool to pick apart what requests are being made by the page and to where, then mimicking these calls to get the information you want.
I'm having trouble interpreting the panels of Firebug. I think the URI I'm trying to send a request to is www.facebook.com/ajax/inventory_estimator.php, though I'm not sure how to form a call.
So, if I want to write a script or program that takes a list of words to use as keywords and returns the estimated number of users for each keyword, how could I do it?
Link to Facebook's Ads Manager Tool, Campaign Creation Page:
http://www.facebook.com/ads/create
yes using an extension like firebug to examine the HTTP requests is a good way to do this.
The Net tab is the one you want (last one).
Have you tried irobotsoft webscraper? It has a good ajax support.
Check their forum here: http://irobotsoft.org/bb/YaBB.pl

Resources