Paginated API Tasks
Twilio's HackerRank assessment usually includes one REST-API task. You get a jsonmock endpoint, a query parameter or two and a function to fill in. Results come back a page at a time, and your answer has to cover all of them, so the loop over the responses matters as much as the math.
Three versions are worked end to end below, starting with the one that shows up most. One is short, and the last is a newer form of the same endpoint.
Here the responses are passed in, already parsed, so the code runs with no network. The loop is the one you'd write against the live endpoint anyway. Read total_pages from the first response and walk through the rest in order. The follow-ups then swap the argument for real HTTP calls.
TwilioPremium lesson · Coding round
The 3 Twilio problems are below.
- A Premium questionCoding · Medium · Signature problem
- A Premium questionCoding · Easy · Frequently asked
- A Premium questionCoding · Medium
Each with hints, the follow-up and a tested solution.
Get the Twilio questions$49 a year · all 100 companies · cancel anytime
From 197 Twilio reports, forum threads behind logins and write-ups in Chinese.
Twilio interview guideKnow what Twilio asks before you walk in.
31 coding · 3 system design · 18 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.