Twilio REST API: request messages after sid

Problem

Using the Twilio REST API, I want to request only those messages that I have not yet downloaded. It seems the cleanest way to do this is to download only messages after the specified SID.

Information not in documents

Twilio filter documents do not have this option. They describe only to, fromand date_sent.

However, it seems that Twilio has this feature. You can see in your paging information what it nextpageuricontains AfterSid.

When the website starts, the URL contains /user/account/log/messages?after=SMXXXXXX

What I tried so far

Using the twilio-ruby client, I tried the following without success:

list = @client.account.sms.messages.list({after: 'SMXXXXXX'})

list = @client.account.sms.messages.list({AfterSid: 'SMXXXXXX'})

list = @client.account.sms.messages.list({after_sid: 'SMXXXXXX'})

+3
source share
2 answers

Dan Markiewicz - Twilio

, API . - DateSreated SID, , , . , , , , . , date_created , . , .

0

, , , , twilio-ruby. , .

, 45, next_page_uri , . :

calls = twilio_client.account.calls.list # returns the initial set of calls.
calls.next_page # this uses next_page_uri to return the next set of calls internally.

, .

0

All Articles