When calling API between different VPCs fails, please check whether the networks of two VPCs can interoperate. If not, you can create a VPC peer-to-peer connection, open the network of two VPCs, and realize cross-VPC access to the instance.
The API is not bound with the flexible public IP(EIP), which leads to the lack of effective address for public network access, and the public network fails to call the API.
Just bind EIP before calling it. Please refer to network environment preparation for detailed steps.