Hi, it seems there is a bug in the latest <PHP ory...
# ory-network
f
Hi, it seems there is a bug in the latest PHP ory client when listIdentites() in combination with filter the for credentials identifier. I’ve found that there are two deprecated params
page
and
per_page
which seems to be replaced by `page_token`and
page_size
. The PHP SDK sends all 4 params and always get a HTTP 500 response. When I change the SDK to only pass
page
and
per_page
it works. When I change the SDK to only pass `page_token`and
page_size
it does not. Now my question, which parameters should be passed? Does it make sense to create an Issue or a PR on Github?
p
Hi @faint-tent-43897 The API spec shows that the
page_token
should be used since
page
is deprecated, however still usable. https://www.ory.sh/docs/reference/api#tag/identity/operation/listIdentities Maybe the
page_token
value you are using is incorrect? https://www.ory.sh/docs/ecosystem/api-design#pagination
f
Yes, it seems I did not understand the page_token correct. Now it looks still like an issue that the value is by default a string “1”.
Testing now with empty page token..
Ok, so the issue is that the SDK has a default pageToken parameter of “1” which makes every request results in 500 Error. Also when using the old parameters. It works when explicitly set pageToken to be NULL. Example
Copy code
$client->listIdentities(pageSize:10, pageToken:null, credentialsIdentifier: $email);
p
interesting, this is a problem in the API definition then. https://github.com/ory/x/blob/master/pagination/migrationpagination/header.go#L54-L57 I'll open an issue for this
f
Alright, thank you for the support.