infiniflow/ragflow · error · ConnectorMissingCredentialError
DingTalk access_token is required
Error message
DingTalk access_token is required
What it means
Raised by DingTalkAITableConnector.load_credentials() when the credentials dict has no truthy 'access_token' entry. This is the explicit gate before any Notable client is constructed, so the connector fails fast at credential-load time instead of later during indexing.
Source
Thrown at common/data_source/dingtalk_ai_table_connector.py:100
"""Create DingTalk Notable API client."""
config = open_api_models.Config()
config.protocol = "https"
config.region_id = "central"
return NotableClient(config)
def load_credentials(self, credentials: dict[str, Any]) -> dict[str, Any] | None:
"""
Load DingTalk credentials.
Args:
credentials: Dictionary containing 'access_token'
Returns:
None
"""
access_token = credentials.get("access_token")
if not access_token:
raise ConnectorMissingCredentialError("DingTalk access_token is required")
self._access_token = access_token
self._client = self._create_client()
return None
@property
def client(self) -> NotableClient:
"""Get the DingTalk AITable client."""
if self._client is None:
raise DingTalkAITableClientNotSetUpError()
return self._client
@property
def access_token(self) -> str:
"""Get the access token."""
if self._access_token is None:
raise ConnectorMissingCredentialError("DingTalk access_token not loaded")
return self._access_tokenView on GitHub (pinned to 554fb1133a)
Solutions
- Supply a valid DingTalk access_token in the credentials dict: credentials={'access_token': '<token>'}
- Check for exact key name 'access_token' (no 'dingtalk_' prefix) and non-empty value
- If the token is short-lived, ensure it is freshly obtained before each connector run
Example fix
// before
connector.load_credentials({'token': 'xxx'}) # raises
// after
connector.load_credentials({'access_token': 'xxx'}) Defensive patterns
Strategy: validation
Validate before calling
if not credentials.get('access_token'):
raise ValueError('credentials must include a non-empty access_token') Prevention
- Validate credential dicts at the config/form layer before passing to load_credentials
- Use exact key 'access_token' and assert non-empty in a shared helper
When it happens
Trigger: Building the connector via the API without providing an access_token in the credential payload, passing an empty string, or a key mismatch ('token' instead of 'access_token').
Common situations: Credential form submission dropped the token field; automation scripts that template the credentials dict and leave the placeholder empty; token stored under the wrong key name.
Related errors
- DingTalk Notable
- main() must be defined or exported.
- main() returned a non-JSON-serializable value.
- message.compileNotSupported
- Failed to fetch search detail
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/a206d74344fa44b6.
Report an issue: GitHub.