Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this pageProducts used
Looking for more inspiration?Visit the
Error
Application error

19038: Page token must be bigger than or equal to 0

Twilio Chat DocumentationChat

Description

description page anchor

This error occurs when you request Chat resources with a PageToken value that is less than 0. PageToken must be a non-negative integer when you paginate through results.

Possible causes

possible-causes page anchor
  • The request includes a PageToken query parameter with a negative value
  • Your application decrements the page token below 0 while paginating through Chat messages or other list results
  • A client-side validation issue allows an invalid PageToken value to be sent to the Chat API
  • A variable used to build the request is uninitialized or incorrectly parsed, which results in a negative number
  • Update your request so PageToken is set to 0 or a positive integer
  • Add input validation before sending the request to prevent negative PageToken values
  • Review your pagination logic to make sure previous-page calculations never produce a value below 0
  • If you are storing pagination state, confirm the value is preserved correctly between requests
  • Test the request with a known valid PageToken value to verify the rest of the request is correct

Additional resources

additional-resources page anchor