Significant-Gravitas/AutoGPT · info · HTTPException

Credentials not found

Error message

Credentials not found

What it means

GET /integrations/{provider}/credentials/{cred_id} returns 404 'Credentials not found' when the cred_id ends with the reserved SDK-default suffix '-default' (is_sdk_default). These pseudo-IDs (e.g. 'google-default', minted by sdk/builder.py) are internal defaults and must never be exposed or fetched through the API.

Source

Thrown at autogpt_platform/backend/backend/api/features/integrations/router.py:438

    credentials = await creds_manager.store.get_creds_by_provider(user_id, provider)

    return [
        to_meta_response(cred) for cred in credentials if not is_sdk_default(cred.id)
    ]


@router.get(
    "/{provider}/credentials/{cred_id}", summary="Get Specific Credential By ID"
)
async def get_credential(
    provider: Annotated[
        ProviderName, Path(title="The provider to retrieve credentials for")
    ],
    cred_id: Annotated[str, Path(title="The ID of the credentials to retrieve")],
    user_id: Annotated[str, Security(get_user_id)],
) -> CredentialsMetaResponse:
    if is_sdk_default(cred_id):
        raise HTTPException(
            status_code=status.HTTP_404_NOT_FOUND, detail="Credentials not found"
        )
    credential = await creds_manager.get(user_id, cred_id)
    if not credential:
        raise HTTPException(
            status_code=status.HTTP_404_NOT_FOUND, detail="Credentials not found"
        )
    if not provider_matches(credential.provider, provider):
        raise HTTPException(
            status_code=status.HTTP_404_NOT_FOUND, detail="Credentials not found"
        )
    return to_meta_response(credential)


class PickerTokenResponse(BaseModel):
    """Short-lived OAuth access token shipped to the browser for rendering a
    provider-hosted picker UI (e.g. Google Drive Picker). Deliberately narrow:
    only the fields the client needs to initialize the picker widget. Issued

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Do not construct credential IDs by convention; list real credentials via GET /integrations/{provider}/credentials and use an actual ID
  2. If a preset/node stores a '-default' ID, clear the credential binding and re-select a concrete credential
  3. SDK authors: resolve default credentials inside the SDK, never pass the '-default' ID across the API boundary
Defensive patterns

Strategy: validation

Validate before calling

if cred_id.endswith('-default'):
    raise ValueError(f"{cred_id!r} is an SDK-default ID; fetch a real credential ID via GET /integrations/{provider}/credentials")

Prevention

When it happens

Trigger: GET /integrations/{provider}/credentials/{provider}-default — any cred_id whose string ends in '-default'.

Common situations: A client or block resolves a provider name into '{provider}-default' and tries to fetch or dereference it like a normal credential ID; SDK-generated presets leak the default ID into a graph preset that is later opened in the platform UI.

Related errors


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/efea126841169355. Report an issue: GitHub.