check for invalid api_key