Testing Sandbox

There are 2 environments, live and sandbox. App is defined in the Developers area of Sandbox. App is installed on Sandbox for tests (installed not on live but on sandbox). During the ad hoc installation, access token code is received by the client id, so far all is good.

Problem is when calling an endpoint, the results from Live are brought and not the results from Sandbox. I understand both options use the same url, right? What makes the API call Sandbox for tests and not the live environment?

Thanks, Lior