Error while setting up API