I am trying to figure out how to be able to show the user a list of delivery logs related to the specific message they sent out. Right now I can't seem to find a way of grouping the logs, short of basing it off of a date and time and maybe anything within 5 minutes of the time it was sent. This is because it assigns a different message and request ID to each number that message was sent to. But is there a better way?
Go to Plivo > SMS > Logs
Download logs
Open with Notepad++
???
Filter as you please.
Otherwise, check API documentation.
The Plivo webapp offers these filters: "From/To/Direction/Status/Error/Timeframe" as per: snag.gy/P6sRNH.jpg
Also, if you mean to display to the user programatically through REST API, I think you should make an app with the following flow:
auth api
fetch all logs (maybe pass a value of last time they sent messages + 14 days... if that is saved somewhere) > URI: /v1/Account/YOURACCOUNTMX3$cD../Message/
Search by Params : { text : Your Text Here
Related
I am having trouble retrieving all messages through the Gmail API PHP Library. I use listUsersThreads to retrieve all threads to do either a full or partial mailbox sync on a user's account. The initial full sync processes and returns the message ids I need, which I then use to store mail meta headers (from, to, date, subject). A subsequent call using listUserHistory from the last history id, allows me to do a partial sync to only retrieve the latest messages. From the data I have stored, I then display a full message conversation log between two parties, ordered by date to show the conversation. Clicking the message will then query the API to retrieve email body, which I then display.
The issue is that based on the messages I have saved, looking at the MIME content, there are messages in the MIME body, that I do not have on my database. I then also tried to query the API using a search query, and still there are missing messages, not returned by the API.
A previous developer used mimecast to get the messages, and querying that database does in fact return the messages that I'm missing.
How is the Google Gmail API not giving me all messages between sender and receiver? The MIME body clearly shows messages that are not available when querying the API, and I don't understand why, or how to find the missing messages.
Any assistance would be appreciated.
So, for in case this issue comes up for anyone else, I believe that it has something to do with expired history items. I stand to be corrected, as this can only be proved after I've had my implementation running for more than two weeks.
If you're considering running a mailbox sync, there's a good chance that you'll be missing messages, especially if those messages were sent from a client other than Inbox or Gmail. History items are kept for two weeks on average, so by syncing a mailbox, you'll be syncing everything from when the account was activated, but expired history items will not be available.
In theory, this means that you should have the full email conversation while a partial sync is executed. You should have all the MIME headers that you need as and when the communication takes place, provided that, like me, you have push notifications enabled through the Google Cloud Services console to alert your systems to run a partial sync process on any given account.
If your partial sync is executed manually, or possibly through CRON on an interval, rather than through push notifications, you'll need to make sure that the interval is configured to sync while all history items are still available and accessible.
The downside of this, though, is that even if you do have trace of all communication with their message IDs, a lookup on an expired message to retrieve email body will fail with a 404 status code, and you will not be able to retrieve email body contents for some messages.
Thus, if your processes relies heavily on what's in the body of the email, you should also store body content locally during a partial sync I really only need the MIME headers, although I do lookup message contents when needed, but it won't cause major problems for me if I was unable to retrieve the body of any given message.
I should be able to confirm this theory within a month from now, so if you think my theory is incorrect, please feel free to make me the wiser. :)
Hi I need to build a dashboard which shows stats for our automation campaigns such as sends, opens, bounces etc.
The Mailchimp api only returns for the entire period the automation has been active. I want to see the stats for a particulier date, however I can't find an API method that accepts a date range or groups results per date. The lists/activity method is exactly what I need, but it doesn't include e-mails sent using an automation :(
I have emailed the Mailchimp support team and they recommend me to use the /reports/email-activity method. This returns a long list of all open and bounce activities for an automation. I have tried to use this, but this is also not a good solution. This means I would have to store thousands of events in MySQL and run complicated group by and where queries to get my data. Furthermore this only includes the open, click and bounce events, thus this data is worthless without knowing how much e-mails were sent on the date of an event because you can't calculate open rates.
Does anyone know a way the retrieve stats for just one date? What I am looking for is a Mailchimp version of Mandrill method: https://mandrillapp.com/api/docs/messages.JSON.html#method=search-time-series.
Thank you for you time and help
for the campaigns exist "Response body parameters"
before_send_time
since_send_time
campaigns?since_send_time=2016-02-21T15:41:36+00:00&before_send_time=2017-03-10T15:41:36+00:00
I've integrated Twilio for a client, but I need to incorporate their hours of operation. I know the sms messages have statuses, but how can I control the status when the message is created? I need the message to be created, but IF it's outside of hours of operation to NOT send the text... so put it in a queue... then when hours open again, send the text.
I see how I can query a sent message and see the status... but I want to specify the status and make sure it doesn't get sent until I specify when.
Please let me know how I can accomplish this. Thanks!
Megan from Twilio.
This is something you'll have to build into your application logic.
There are plenty of approaches you could take here such as scheduling a cron job or using a worker like Iron.io as seen in this post.
I hope this info helps.
I am striving hard to get the threaded conversation list of twitters direct messages. The twitter seems not providing its conversation API publically.
The work around , I was thinking on , is as below:
There are two separate API:
GET direct_messages : This api returns all the direct messages sent
to you.
GET direct_messages/sent : This api returns all the direct
messages sent by you.
I am planning to compare/merge the list based on the sender and receiver id to group them and create conversation threads.
But it is not feasible to mix these two result to get the entire conversation.Because we get 20 to 30 messages per call it might be possible that the entire conversation might not match.
Can anyone suggest or route me to a more precise solution which will provide me with the direct message conversation thread
From the documentation:
You can request up to 200 direct messages per call, and only the most recent 200 DMs will be available using this endpoint.
Really, the best you can do is take the 200 most recent messages sent to your user. Then, you can grab up to 800 messages sent by the user.
You'll have to thread them yourself based on their timestamp.
There's no other way to do this at the moment.
I am using the Esendex Rest API http://developers.esendex.com/APIs/REST-API/inbox and I am trying to get all the messages in the inbox from a particular phone number.
This is basically so if I do a send out of SMS's and someone replies I am able to retrieve the reply.
I can currently get all the messages in the inbox into an array and sort them, but this is too slow with over 4000 messages.
Does anyone know if I can filter by phone number, or at least date-received in my API requests? Even if I could get the last weeks worth of SMS's.
You can try to use the conversation API if you want to filter by a phone number. The drawback is that you can get only the latest 15 messages, also that there is no reliable way to detect if a reply has been received from a phone number other than the inbox API. Apart from this I wasn't able to find anything that can help you. Their API is very restrictive and minimal.
There's currently no way to do this via the REST API but I'll see if we can add it over the next couple of weeks (I work for Esendex). As you note the functionality already exists in the Conversations API albeit in a more minimal form.
In the meantime you could achieve this by checking all messages that arrive either by polling the Inbox or using Push Notifications.