How can I count the number of contacts from the TextIt API?

0
4
Asked By CuriousCat42 On

I'm working on a project where I need to count the number of contacts from the TextIt API. The API endpoint I'm using is https://textit.com/api/v2/contacts, but it only seems to return all the contact details, not just the count I need. I want to automate a spreadsheet that pulls this count once a day, but I'm not sure how to do it. Can anyone help me figure this out?

4 Answers

Answered By DataDynamo93 On

To get the number of contacts, you'll have to use the endpoint you mentioned. When you hit https://textit.com/api/v2/contacts, it will return all the details about your contacts, but it sounds like you only need the count. You can parse the response into a list and then just check how many items are in that list to get your count. That’s a quick way to go about it!

Answered By CuriousCat42 On
Answered By SkepticalSam77 On

Have you tried finding this information through the API documentation? It could potentially save you a lot of time instead of pulling all data just to get a count. Also, I'd recommend checking if they offer any quicker methods to get just the count.

Answered By TechieTina88 On

Actually, that specific call is meant to return contact details rather than just a count. If there's another endpoint available specifically for getting counts, that would be ideal. Otherwise, your best bet would be retrieving the full list and counting them yourself.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.