{"record":{"id":"d0eb04b00dcba9cc","repo":"multica-ai/multica","slug":"dingtalk-appkey-client-id-is-required","errorCode":null,"errorMessage":"dingtalk: AppKey (client id) is required","messagePattern":"dingtalk: AppKey \\(client id\\) is required","errorType":"http","errorClass":"ErrInvalidAppKey","httpStatus":400,"severity":"error","filePath":"server/internal/integrations/dingtalk/byo_install.go","lineNumber":20,"sourceCode":"\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/jackc/pgx/v5/pgtype\"\n\n\tdb \"github.com/multica-ai/multica/server/pkg/db/generated\"\n)\n\n// ErrInvalidAppKey / ErrInvalidAppSecret are returned by RegisterBYO when a\n// pasted credential is empty. The handler maps them to 400 so the dialog can\n// show a precise hint instead of a generic failure.\nvar (\n\tErrInvalidAppKey    = errors.New(\"dingtalk: AppKey (client id) is required\")\n\tErrInvalidAppSecret = errors.New(\"dingtalk: AppSecret (client secret) is required\")\n\t// ErrCredentialValidation wraps a live access-token mint that rejected the\n\t// pasted AppKey/AppSecret. It is a user error (bad credentials), so the\n\t// handler maps it to 400 — unlike an internal encrypt/persist failure, which\n\t// must surface as 500.\n\tErrCredentialValidation = errors.New(\"dingtalk: could not validate credentials\")\n)\n\n// RegisterBYOParams are the inputs for a bring-your-own-app install: the agent\n// this bot represents, who is installing, and the two credentials the user\n// pasted from their own DingTalk Stream-mode robot.\ntype RegisterBYOParams struct {\n\tWorkspaceID pgtype.UUID\n\tAgentID     pgtype.UUID\n\tInitiatorID pgtype.UUID\n\tAppKey      string // client id — robotCode + access-token mint\n\tAppSecret   string // client secret — access-token mint (encrypted at rest)\n}","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/integrations/dingtalk/byo_install.go#L2-L38","documentation":"Error \"dingtalk: AppKey (client id) is required\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/integrations/dingtalk/byo_install.go:20 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the DingTalk AppKey (client id) for the custom app installation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}