SigNoz/signoz · error · errors SigNozError
CodeInvalidInput
CodeInvalidInput
Error message
clientId is required
What it means
Returned by the Google auth config's UnmarshalJSON when the payload has no clientId. This config drives Google OAuth integration, and a client ID is mandatory before secret/group settings are validated.
Source
Thrown at pkg/types/authtypes/google.go:54
// Optional list of allowed groups
// If this is present, only users belonging to one of these groups will be allowed to login
AllowedGroups []string `json:"allowedGroups,omitempty"`
// Whether to skip email verification. Defaults to "false"
InsecureSkipEmailVerified bool `json:"insecureSkipEmailVerified"`
}
func (config *GoogleConfig) UnmarshalJSON(data []byte) error {
type Alias GoogleConfig
var temp Alias
if err := json.Unmarshal(data, &temp); err != nil {
return err
}
if temp.ClientID == "" {
return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "clientId is required")
}
if temp.ClientSecret == "" {
return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "clientSecret is required")
}
if temp.FetchGroups {
if len(temp.DomainToAdminEmail) == 0 {
return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "domainToAdminEmail is required if fetchGroups is true")
}
if temp.ServiceAccountJSON == "" {
return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "serviceAccountJSON is required if fetchGroups is true")
}
}
if len(temp.AllowedGroups) > 0 && !temp.FetchGroups {
return errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "fetchGroups must be true when allowedGroups is configured")View on GitHub (pinned to 5069bf80b0)
Solutions
- Add the non-empty "clientId" from the Google OAuth client credentials
- Verify the JSON key spelling is exactly clientId (camelCase) and matches the struct tags
- Regenerate OAuth credentials in Google Cloud Console if unsure of the client ID
Example fix
// before
{"clientSecret": "shh"}
// after
{"clientId": "123456.apps.googleusercontent.com", "clientSecret": "shh"} Defensive patterns
Strategy: validation
Validate before calling
if (!cfg.clientId?.trim()) {
throw new Error("clientId is required");
} Type guard
function hasClientId(c: unknown): c is { clientId: string } {
return typeof c === "object" && c !== null && typeof (c as any).clientId === "string" && (c as any).clientId !== "";
} Try / catch
try { await saveGoogleConfig(cfg); } catch (e) { if (String(e).includes("clientId is required")) highlightField("clientId"); else throw e; } Prevention
- Validate OAuth credentials client-side before posting
- Store clientId/secret as a pair in your secret manager so they are never half-applied
When it happens
Trigger: Submitting the Google integration JSON config without clientId or with an empty string, which is unmarshalled into the Google auth Alias type.
Common situations: Copy-pasting integration config and missing the client ID, using the wrong JSON key (client_id), or pasting only the client secret after credential rotation.
Related errors
- CodeInvalidInput
- invalid_input
- CodeInvalidInput
- ErrCodeResetPasswordTokenExpired
- ErrCodeResetPasswordTokenExpired
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/1408ad3f7b958a21.
Report an issue: GitHub.