API returns not authroized sites objects. User authroized only one

Hi,

In our system we need to use JIRA Api to create a ticket for user. We use JIRA OAuth 2.0 for user authorization. When in our system user clicks connect to JIRA a JIRA page pops up and user authorize only one site then in the code we use this url https://api.atlassian.com/oauth/token/accessible-resource to get the project of authorized site.

Here is the code example

const result = await this.httpService.axiosRef.get(
                'https://api.atlassian.com/oauth/token/accessible-resource',

                {
                    headers: {
                        Authorization: `Bearer ${accesToken.access_token}`,
                    },
                }
            );
            if (result.data) {
                // this data contain all sites objects however it should return only authorized site data
                const jiraProjects = await this.getAllProjectsJira(
                    result.data[1].id,
                    accesToken.access_token
                );
                return jiraProjects;
            }

The issue is that API returns all websites object but we want to have only the one that user authorized during JIRA login. Please let us know what miss here. Why the code returns all sites objects.

Thanks in advance