The -only- way... no.
The way 99% of developers who know what they are talking about would recommend: yes.
Basically an API is meant for exactly that: joining two independent systems.
For example, I have a site which uses the logins from a different system. In order to authenticate, we have a web service (an API) which I call to ask that server for the information I want in order to know if I should let the user log in or not. Afterwards, I can ask it other things like information about that user.