Saumil Shah
Saumil Shah

Reputation: 1473

How do I pull all inactive conversations from twilio?

I know that I can get conversations with

await client.conversations.conversations.list({limit: 20)

but how do I only pull those conversations that are in-active?

I've tried

await client.conversations.conversations.list({
state: 'inactive'
limit: 20
)}

but that doesn't seem to work

Upvotes: 1

Views: 334

Answers (1)

philnash
philnash

Reputation: 73065

The documentation for fetching multiple conversations does not list any filters that you can use with the API, so it's not possible to filter conversations in the request.

Instead, you will need to fetch all the conversations and filter the inactive ones in your own code.

Upvotes: 2

Related Questions