How to get site id after Jira OAuth 2.0 callback?

Use Jira OAuth 2.0, when redirect to

https://api.atlassian.com/oauth2/authorize

Select a site from Use app on dropdown list, got all sites from response data:

const apiUrl = `https://api.atlassian.com/oauth/token/accessible-resources`;

const headers = {
  Authorization: `Bearer ${accessToken}`,
  Accept: "application/json",
};

fetch(apiUrl, {
  headers: headers,
})
  .then((response) => {
    return response.json();
  })
  .then((data) => {
    console.log(data);
  });

Response:

[
  {
    id: 'id1',
    url: 'https://site1.atlassian.net',
    name: 'org1',
    scopes: [
      'read:jira-work'
    ],
    avatarUrl: 'png1'
  },
  {
    id: 'id2',
    url: 'https://site2.atlassian.net',
    name: 'org2',
    scopes: [
      'read:jira-work'
    ],
    avatarUrl: 'png2'
  }
]

How to get cloudid(site id) which user selected? I didn’t find a valid value from callback data.
If can’t, why provide the dropdown list option?

I’m facing the same issue. Is the dropdown just dead code? I’ve analyzed every response I get from every endpoint, and it doesn’t seem to make any difference what I select, all options are always returned.