rename check_api_credentials in check_credentials