I have requirement from compilance to backup my business WA users chats (for reasonable price...)
Ive googled a lot and seems (correct me if Im wrong) only solution is to build own chat app (or use app delivered by API provider)
I've checked eg twilio, 360dialog, chat-api
I played a bit witch twilio and I know how to save incoming messages (sent by eg client), but not outgoing (sent by my users)
Also I know how to send WA msgs from my own app (so I can record those)
But my preference would be users to use WA on mobile phones or WA web and listen some hooks to record that.
Any idea how to implement that? Maybe WA buisness API can do that?
There is no straight way to do this using WhatsApp Business APIs,
You need to record both the messages in one place/table/collection whether it is sent from our business phone number or received from the clients/users.
We can do it but have to use proper logic, let's see both the scenario and how to record it in one place/table/collection,
Send Message from WhatsApp Business API (from our business phone number) to clients/users:
You can record the message whenever Business sends any message to clients/users because Webhook does not give that sent message content, yes it will notify us about status updates like sent, delivered, read, failed, etc.
Things we can record:
Message ID (This is important, you will get in response whenever we send a message from Business API)
From Phone Number (Business phone number)
Message Content
To Phone Number (Client/user phone number)
Message Status (sent, read, delivered, failed)
Sent Date
Updated Date (updated message status date)
Type (from business)
Receive Messages from clients/users to our Business Phone Number:
You can get message content from Webhook, so we can record that received message content object in our table/collection,
Things we can record:
Message ID (This is important, Get in Webhook)
From Phone Number (Client/User phone number)
Message Content
To Phone Number (Business phone number)
Message Status (sent, read, delivered, failed)
Sent Date (message received date)
Updated Date (updated message status date)
Type (from user/client)
Other Things that I am not sure about:
We can't get message content If a Business phone number sends a message to a client/user from WhatsApp Business App.
Related
I am sending a text to a mobile number (US phone number) using the Programmable Messaging Quickstart for C# with .NET Core example. The message is sent and received successfully but the STATUS in the response shows "queued".
Is there a sample callback in C# to obtain the final status after the text is sent?
You have 3 options, either of the first two are suggested.
Subscribe to statusCallbacks, which will alert your application of the delivery status of the send message.
Use Event Streams to subscribe to specific message delivery event types (this option provides the ability to select different types of message delivery events).
Less efficient and not very scalable, make a request to the /Messages endpoint to determine the final disposition of the sent message (via its unique message SID).
Best Practices for SMS Message Logging
In Morocco we have 3 operators:
=> IAM, INWI and ORANGE
=> My personal phone number was originally purchased from IAM operator then i have transfered it to INWI (and this is the problem)
I am integrating Twilio in my software and have made some tests and observed this when sending a new sms to someone :
- If the phone number is normal (not transfered as in my case) the SMS is delivered correctly
- If the phone number is transfered from an operator to an other as in my case the SMS is not Delivered
Am i missing any config or something ?
I am testing with postman via post http call to Twilio REST API url :
https://api.twilio.com/2010-04-01/Accounts//Messages.json
I already have a Twilio application with this use case :
The incoming message is forwarded to a client
The client replies to the message by sending a message to the twilio number. The message body will contain the phone number at the beginning followed by the message content.
The web hook checks if the message is received from the client and it contains a phone number. If so, it forwards the message to the phone number in the body.
I would like to implement this use case using Twilio studio.
Is this possible?
You can use the Split widget and use a regular expression to test whether the input from Step 2 contains a phone number or not.
i got this message while i am trying to send sms with twilio. i never blocked any number
In my case it happened for an Indian number. For Indian number it could be blocked by the end user -
Limitations sending SMS messages to Indian mobile devices
SMS messages entering into India are categorized as “Transactional” or “Promotional” and may result as an "Error - 30004".
By default, all SMS messages sent from Twilio phone numbers are categorized as “Promotional” and are subject to the following limitations:
They cannot be sent to any phone number in India’s Do Not Call Registry
If you’ve been having trouble sending SMS messages to an Indian number, see if that number is registered on the National Do Not Call Registry.
If the owner of the phone number wishes to start receiving SMS messages from Twilio, they can update the DNC settings by following the instructions on this website.
More details : https://support.twilio.com/hc/en-us/articles/223134167-Limitations-sending-SMS-messages-to-Indian-mobile-devices
Twilio developer evangelist here.
Error 30004 doesn't mean that you blocked a number, but that the number you are trying to send to has blocked messages from your number. They could have done so by texting "STOP," "CANCEL" or other particular words to your number.
If you don't believe that this has happened, then I recommend you get in touch with Twilio support with the number that is causing this error and they will look into it.
I am testing the SMS message status log in Twilio (python), but I'm finding that all statuses report as "delivered", even if the receiving device is turned off. Are only particular carriers able to confirm delivery to the handset? Or am I pulling the wrong status?
message = client.messages.create(
body="Phone off!",
to="97.....",
from_="97.....",
)
resources = client.messages.list()
for resource in resources:
print resource.to, resource.status
Twilio evangelist here.
The Delivered status indicates that we have received a delivery receipt from the upstream carrier. If the carrier reports it to us, we should show messages that were delivered to powered off handsets as undelivered. Not all carriers return the same data so its possible that the specific carrier you are sending the message is not returning the powered-off state to us. I'd suggest shooting an email to help#twilio.com and they can work with you to determine what details your specific carrier is returning to Twilio.
Hope that helps.