获取后续结果页面的正确方法是使用pageToken
您描述的参数。虽然我相信我之前已经看过这项工作,但我已经验证 API 当前正在为此返回 500 错误。(请参阅下面的测试结果。)这似乎是一个服务器端问题。
curl 'https://proximitybeacon.googleapis.com/v1beta1/beacons?pageSize=3' -H 'Authorization: Bearer MY_SECRET_OAUTH_TOKEN_HERE'
{
"beacons": [
{
...
},
{
...
},
{
...
}
],
"nextPageToken": "Civ55nT/+//+zN7Pzs/Nz8zPy8/Kz8nPyM/Hz8bPns+dz5zPm8+ayMmdnf/+EAMhko+M85V85JMx00LwZ+bdJe8xuNeGz7eSTJAxP86ZtGulO0o5AQAEAIsZAABQAFoLCcck85hsjQ0JEAE",
"totalCount": "5"
}
$ curl 'https://proximitybeacon.googleapis.com/v1beta1/beacons?pageSize=3&pageToken=Civ55nT/+//+zN7Pzs/Nz8zPy8/Kz8nPyM/Hz8bPns+dz5zPm8+ayMmdnf/+EAMhko+M85V85JMx00LwZ+bdJe8xuNeGz7eSTJAxP86ZtGulO0o5AQAEAIsZAABQAFoLCcck85hsjQ0JEAE' -H 'Authorization: Bearer MY_SECRET_OAUTH_TOKEN_HERE'
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
```