Debugging the api connection