multica-ai/multica · error · ErrInvalidAppKey

dingtalk: AppKey (client id) is required

Error message

dingtalk: AppKey (client id) is required

What it means

Error "dingtalk: AppKey (client id) is required" thrown in multica-ai/multica.

Source

Thrown at server/internal/integrations/dingtalk/byo_install.go:20

import (
	"context"
	"encoding/base64"
	"encoding/json"
	"errors"
	"fmt"
	"strings"

	"github.com/jackc/pgx/v5/pgtype"

	db "github.com/multica-ai/multica/server/pkg/db/generated"
)

// ErrInvalidAppKey / ErrInvalidAppSecret are returned by RegisterBYO when a
// pasted credential is empty. The handler maps them to 400 so the dialog can
// show a precise hint instead of a generic failure.
var (
	ErrInvalidAppKey    = errors.New("dingtalk: AppKey (client id) is required")
	ErrInvalidAppSecret = errors.New("dingtalk: AppSecret (client secret) is required")
	// ErrCredentialValidation wraps a live access-token mint that rejected the
	// pasted AppKey/AppSecret. It is a user error (bad credentials), so the
	// handler maps it to 400 — unlike an internal encrypt/persist failure, which
	// must surface as 500.
	ErrCredentialValidation = errors.New("dingtalk: could not validate credentials")
)

// RegisterBYOParams are the inputs for a bring-your-own-app install: the agent
// this bot represents, who is installing, and the two credentials the user
// pasted from their own DingTalk Stream-mode robot.
type RegisterBYOParams struct {
	WorkspaceID pgtype.UUID
	AgentID     pgtype.UUID
	InitiatorID pgtype.UUID
	AppKey      string // client id — robotCode + access-token mint
	AppSecret   string // client secret — access-token mint (encrypted at rest)
}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Provide the DingTalk AppKey (client id) for the custom app installation.

When it happens

Trigger: Thrown at server/internal/integrations/dingtalk/byo_install.go:20 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/d0eb04b00dcba9cc. Report an issue: GitHub.