Is there any option to get unread messages count by user? Is there any Twilio apps that can help me?
I just need mapping, ex:
[{user: messages_count}, {user2: messages_count}, {user3: messages_count}, ...]
Is there any chance to get data for my backend like this?
Library provided by Twilio for backend is not vectorized and I need to make 1000+ post requests. It can take a century).
I'm considering webhooks or whatever that can helps me to get this data, and not kill my server.
Related
I've been trawling through the support docs but they are mostly about blocking incoming SMS. I'm looking for a way to block sending SMS, within an existing flow, to specific numbers at various times and then be able to lift that block again, relatively easily.
Some of the users of our system have a very specific use case where they would be inundated with SMS and I'm wondering if this might be a workaround.
There isn’t a way to block inbound SMS. You can remove the webhook but the inbound SMS are lost. There is an API to provision webhooks on numbers.
For outbound, you need to code the logic on your side.
I set up Google Sheets to sent SMS by list, using this guide:
https://techandeco.medium.com/send-sms-event-updates-or-discount-codes-using-twilio-from-a-google-sheet-fd1ebd24c4e
You could add some kind of "Flag" column and modify the code to skip the numbers that are not "flagged".
I went through the AWS pinpoint documentation for checking delivery status of sent SMS message. But, I couldn't find any batter way than streaming SMS Event to either Amazon Kinesis Data Streams or Amazon Kinesis Data Firehose then sending data to Amazon S3 bucket or Amazon Redshift database and only after that to the application.
Here, my requirement is to send just verification code and get the delivery status of SMS message. Is there any better way of achieving this? Because the way I mentioned above is too lengthy and costly. Any help will be appreciated.
sendMessages() API returns status of SMS. It is assumed that this API may not instantly return send status as SMS may not get delivered instantly.
But since "callback", it takes time to return, works Asynchronously.
What is the status it is returning?
refer to: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Pinpoint.html#sendMessages-property
In callback, json "data" returned has "MessageResponse" has field "Result" has field "DeliveryStatus" which has possible values as below:
"SUCCESSFUL"
"THROTTLED"
"TEMPORARY_FAILURE"
"PERMANENT_FAILURE"
"UNKNOWN_FAILURE"
"OPT_OUT"
"DUPLICATE"
Why is status update through Kinesis, then S3 buckets, then Analytics is needed? Actually not needed. With Kinesis you get more detailed information.
On hard pressing simpler ways, AWS expert mentioned use Lamda service to directly send to some "Queue" (possibly another AMZ product) or call HTTP end point through Lamda service. All these services are costly and cost other resources too. "Total Cost of Ownership" just grows or these guys are "up-selling" more products.
I want to send transactional SMS. That's it. I need to know if SMS was delivered or not. That's it. But you end spending for Kinesis (how ever small or large cost), for S3, for Analytics Services, associated EC2, EBS everything.
I discussed hard with AMZ Architect, who settled to, with Kinesis you can directly poll and get status if you configure Pinpoint with Kinesis. So I get SMS event updates ALSO through Kinesis, which are "similar" to what you get by calling getMessages() API.
In SMS event stream directly through Kinesis, you get
"event_type" value as
"_SMS.BUFFERED"
"_SMS.SUCCESS"
"_SMS.FAILURE"
"_SMS.OPTOUT"
reference:
https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams-data-sms.html
And value of "record_status" field you get
"SUCCESSFUL"
"DELIVERED"
"PENDING"
"INVALID"
"UNREACHABLE"
"UNKNOWN"
"BLOCKED"
"CARRIER_UNREACHABLE"
"SPAM"
"INVALID_MESSAGE"
"CARRIER_BLOCKED"
"TTL_EXPIRED"
"MAX_PRICE_EXCEEDED"
Some of these status code may be irrelevant to your case. e.g. "TTL_EXPIRED" is possible value if you are sending "delayed" SMS.
Kinesis, delivered more detailed, but may not be practically useful.
If you exceed your max SMS cost Quota with Kinesis, you get the reason. With sendMessages() API you won't. But you can check SMS quota through APIs.
refer to: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ServiceQuotas.html#getServiceQuota-property
I strongly believe, if sending "Transactional" SMS which are by nature priority delivered, you don't need Kinesis.
Amazon is overselling by entangling services into composite solutions, in some cases. Anyways, they are not wrong, Pinpoint is "Marketing" product to do Campaigns, User Journey and Conversion Analysis. Which is bigger business case for Amazon that "just sending SMS". You may not get best advise for your Usecase, so negotiate hard to save your $s.
Microsoft recommends to use delta function in combination with Subscriptions/Notifications to synchronize mailbox. So my plan is:
Create subscription
Receive notification about new mail in inbox
Use delta function to get latest changes in the inbox
My mailbox already has several thousands of letters. If I run the query
https://graph.microsoft.com/v1.0/users/{id}/mailFolders/inbox/messages/delta
It will return in response #odata.nextLink with $skiptoken param many times and only after I get all the thousands of emails in my mailbox I will receive response with $deltatoken to track new changes.
Is there a way to get deltatoken after the first request? I don't want to synchronize the old messages. I want to skip all old messages in inbox and have a fresh start.
Today the delta query functionality does not support this scenario. To request new features please post ideas to uservoice
This is supported for some endpoints. You can use $deltaToken=latest to get just a deltaToken without any resource data. It's not, as far as I can tell, available for mailboxes… but who knows, maybe it will be soon.
This is not documented anywhere in the documentation for the specific APIs that do support it, but is instead documented in the Overview for change tracking. Why? Because Microsoft wants you to be sad all the time.
Need some Twilio help. I am a novice and I'm kinda lost. This may seem overly simplistic BUT I have a CRM client that will track calls as long as the inbound calls ping the URL - x2vps.com/index.php/api/voip/data/{caller id goes here}
Note: The CRM will automatically track all registered phone numbers that ping this URL.
I have the call routing piece figured out. I can't figure out how to code twilio's API to append the inbound caller ID's to the CRM's URL and ping it. I want to log all calls regardless of the status.
If you could point me in the right direction I would be truly appreciative.
Thank you!
Twilio developer evangelist here.
Twilio does not append the caller ID to the webhook URL that you set. In order to do something like this, you'd need to provide some sort of server in the middle that can transform the Twilio request into the format you need.
You'd do this by creating a web application that would be able to receive the webhook from Twilio. It would then need to get the incoming Caller ID from the Twilio request, this is the From parameter. With the Caller ID, your application would then construct your CRM endpoint URL and make the HTTP request itself. You'd need to decide whether you need to include all the original parameters, if the CRM system can use them.
Let me know if this helps.
I have this project that's based on a Twitter Bot. NOT an abusive or spammer bot. Just a robot that will reply with information about my system when it's mentioned.
The thing is: I expect to have about 3000 mentions/hour. Which means I have to send about 3000 replies/hour.
I know Twitter API calls are limited to 350/h when the app is authenticated and 150/h when it's not. But I've also read about it being 1000/h somewhere in the Twitter Discussion boards.
Anyway, how can I deal with having to send so many replies/hour?
I thought about creating multiple Twitter accounts and delegating some of the replies to them in order to being able to reply to all of them, but I do realize it's not a pretty solution.
Does anyone have a better idea?
Your best bet is to use Streaming.
Connecting
API Params (JSON)
Basically, you open up a connection with their server with your credentials and instead of reading the return stream and closing, you just keep reading. When you want to make a request, you just send another header or something.