Functioning API calls from within the app