multica-ai/multica · error · ErrBindingAlreadyAssigned
dingtalk: user id is already bound to a different user
Error message
dingtalk: user id is already bound to a different user
What it means
Error "dingtalk: user id is already bound to a different user" thrown in multica-ai/multica.
Source
Thrown at server/internal/integrations/dingtalk/binding.go:37
// This file is the DingTalk user-binding token flow: an unbound DingTalk user
// who messages the bot gets a "link your account" prompt (minted here, delivered
// by the OutboundReplier), clicks through to the in-product redeem page, and
// their DingTalk staff id is bound to their Multica account. It mirrors
// slack.BindingTokenService but runs on the generic channel_* queries with
// channel_type='dingtalk'.
// BindingTokenTTL bounds a token's life. The channel_binding_token CHECK
// enforces the same 15-minute cap so a misconfigured caller cannot mint longer.
const BindingTokenTTL = 15 * time.Minute
var (
// ErrBindingTokenInvalid: token unknown / already consumed / expired. One
// opaque error for all three avoids a replay timing oracle.
ErrBindingTokenInvalid = errors.New("dingtalk: binding token invalid or expired")
// ErrBindingAlreadyAssigned: this DingTalk user id is already bound to a
// different Multica user (account transfer must go through explicit unbind).
ErrBindingAlreadyAssigned = errors.New("dingtalk: user id is already bound to a different user")
// ErrBindingNotWorkspaceMember: the redeemer is not a member of the token's
// workspace. Translated to 403 at the HTTP boundary.
ErrBindingNotWorkspaceMember = errors.New("dingtalk: redeemer is not a workspace member")
)
// BindingToken is a freshly minted token. The raw value is returned exactly
// once (embedded in the binding URL); only its hash is persisted.
type BindingToken struct {
Raw string
ExpiresAt time.Time
}
// RedeemedBindingToken is returned after a successful redemption.
type RedeemedBindingToken struct {
WorkspaceID pgtype.UUID
InstallationID pgtype.UUID
DingTalkUserID string
}View on GitHub (pinned to 2c0912b6ec)
Solutions
- Unbind the DingTalk user id from the other account first, or sign in as that account.
When it happens
Trigger: Thrown at server/internal/integrations/dingtalk/binding.go:37 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/ade91abd2f11daf8.
Report an issue: GitHub.