[HELP] I can't read list my own sessions
Hello, I am trying to list my own sessions with this endpoint https://zitadel.com/docs/apis/resources/session_service_v2/session-service-list-sessions :
But I get this :
But I get this :
curl --location 'http://localhost:8080/v2/sessions/search' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"query": {
"offset": "0",
"limit": 100,
"asc": true
},
"sortingColumn": "SESSION_FIELD_NAME_UNSPECIFIED"
}
'{
"code": 16,
"message": "Errors.Token.Invalid (AUTH-7fs1e)",
"details": [
{
"@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
"id": "AUTH-7fs1e",
"message": "Errors.Token.Invalid"
}
]
}Errors.Token.Invalid (AUTH-7fs1e) error typically indicates an issue with the token you're using for authentication. (1) (2) urn:zitadel:iam:org:project🆔zitadel:aud to allow the token to be used against ZITADEL APIs. (3) Authorization: Bearer <your_token>.urn:zitadel:iam:org:project🆔zitadel:aud works but that gives me every sessions and not just while I don't have session.read permissionuserIdQuery or creatorQuery to filter results. (1) creatorQuery with an empty id field—this will use the calling user's ID:userIdQuery with your specific user ID:session.read permission, with an exception: "no permission required to search for own sessions." (1) userIdQuery with another user's ID versus your own. Based on the documented behavior, the expectation is that without session.read permission, you should only be able to retrieve your own sessions.session.read permission, this may be unintended behavior worth reporting. I'd recommend clicking the "Ask for help" button to have a team member review this—they can confirm whether this is expected behavior or a potential issue that should be raised on GitHub.session.read when the authenticated user requests their own session (checked user) . (1) urn:zitadel:iam:org:project🆔zitadel:audoauth/v2/revokeaccess_token, only that specific access token is revoked.refresh_token, the corresponding access_token is revoked as well.Errors.Token.Invalid (AUTH-7fs1e) Authorization: Bearer <your_token>session.readsession.readsession.readsession.readsession.readuserIdQueryuserIdQueryuserIdQuerycreatorQuerycreatorQueryoauth/v2/revokerefresh_token{
"query": {
"offset": "0",
"limit": 100,
"asc": true
},
"queries": [
{
"creatorQuery": {
"id": ""
}
}
],
"sortingColumn": "SESSION_FIELD_NAME_UNSPECIFIED"
}{
"queries": [
{
"userIdQuery": {
"id": "<your-user-id>"
}
}
]
}