The page parameter is not supported in the API version you are using. If you follow the link in the error you will see:
Cursor-based pagination is supported only in version 2019-07 of the API and above. It replaces page-based pagination for the endpoints listed below.
The link contains information on how to use cursor-based pagination instead of page.
I would recommend use the program I mentioned earlier to export your IDs.