Updated API.php to throw an exception when a new token is requested but a token already exists