multica-ai/multica · error · ErrBindingTokenInvalid

binding token invalid or expired

Error message

binding token invalid or expired

What it means

Error "binding token invalid or expired" thrown in multica-ai/multica.

Source

Thrown at server/internal/integrations/lark/binding_token.go:273

		InstallationID: p.InstallationID,
		ChannelUserID:  string(p.LarkOpenID),
	})
	if err != nil {
		if errors.Is(err, pgx.ErrNoRows) {
			return ErrBindingAlreadyAssigned
		}
		return fmt.Errorf("bind installer: %w", err)
	}
	return nil
}

// ErrBindingTokenInvalid is returned by RedeemAndBind when the token
// hash does not exist, the token has already been consumed, or it
// has expired. The caller must NOT distinguish those sub-cases —
// that distinction enables timing oracles for token replay races and
// adds no product value (the user sees the same "link invalid or
// expired, please request a new one" copy either way).
var ErrBindingTokenInvalid = errors.New("binding token invalid or expired")

// ErrBindingAlreadyAssigned is returned by RedeemAndBind when a
// lark_user_binding row already exists for the (installation,
// open_id) pair and points at a different Multica user. Account
// transfer must go through an explicit unbind flow; a binding token
// cannot be used to grab an already-bound open_id from another user.
var ErrBindingAlreadyAssigned = errors.New("lark open_id is already bound to a different user")

// ErrBindingNotWorkspaceMember is returned by RedeemAndBind and
// BindInstallerTx when the user is not (or no longer) a member of the
// target workspace, detected by an explicit IsWorkspaceMember check
// (MUL-3515 §4 removed the member FK that used to enforce this).
// Translated to 403 at the HTTP boundary.
var ErrBindingNotWorkspaceMember = errors.New("redeemer is not a workspace member")

func randomToken(n int) (string, error) {
	buf := make([]byte, n)
	if _, err := rand.Read(buf); err != nil {

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Request a new binding token and redeem it before it expires.

When it happens

Trigger: Thrown at server/internal/integrations/lark/binding_token.go:273 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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