All Products
Search
Document Center

Tablestore:Why does a token become invalid during a paginated query in Search Index?

Last Updated:Aug 25, 2026

A token is not a string. If you encode a token directly into a string using new String(nextToken), information is lost and the token becomes invalid.

To persist a nextToken or transfer it to a frontend, encode the token into a Base64 string. This prevents information loss and ensures the token remains valid for storage and transfer.