Share project with group via API always return 404 not found

I try to share project with group via API POST /projects/:id/share but i always get response 404 with message “Not found”. I am able to invite group to project via web pages, i can delete a shared project link within a group via API with same token as for share.

Is there some logs where i can find what is wrong?

Gitlab version: GitLab Enterprise Edition 15.9.4-ee

curl --location ‘https://gitlab…/api/v4/projects/178099/share/’
–header ‘PRIVATE-TOKEN: xxxxx’
–data-urlencode ‘group_access=40’
–data-urlencode ‘group_id=265415’

{“message”:“Not Found”}

Problem solved when i use my personal token. Before used parent group token.