Accessing Gitea API from custom page


I’m trying to create a new tab page for all our repositories using the Customizing Gitea guide from Docs. This custom page should be able to access the authenticated user information and the repository issues. I know this is possible using the gitea API however it requieres an API key or the credentials of the authenticated user again. Since this page is hosted by the web application, is it possible to use the login cookie as an authentication method for the API? or is it possible to query directly to the service worker?