As @Unnie inform that you have enable cross on server and if api server is not in your control then you cannot do it. for that you have to create proxy server who will take care CROS
There several options from that I will tell you two
If You can use azure then use azure function where you can make api proxy and do setting for CROS
This modern way to connect SharePoint resource thru the REST API thru the client_ID and Client_Secret code.
Lets say target SharePoint is BBB
and source application is AAA
Then we need to follow the below steps to connect to the SharePoint BBB site:
In order to achieve this access - we need to generate a client_id and client_secret from "https://BBB....