{"record":{"id":"37e857273e701e78","repo":"SigNoz/signoz","slug":"errcodeuserdeprecated","errorCode":"ErrCodeUserDeprecated","errorMessage":"the v1 user API is deprecated; instead, get your user with GET /api/v2/users/me","messagePattern":"the v1 user API is deprecated; instead, get your user with GET /api/v2/users/me","errorType":"http","errorClass":"errors.Error","httpStatus":405,"severity":"warning","filePath":"pkg/modules/user/impluser/handler.go","lineNumber":97,"sourceCode":"\t\treturn\n\t}\n\n\tuserRoles, err := handler.getter.GetRolesByUserID(ctx, user.ID)\n\tif err != nil {\n\t\trender.Error(w, err)\n\t\treturn\n\t}\n\n\tuserWithRoles := &authtypes.UserWithRoles{\n\t\tUser:      user,\n\t\tUserRoles: userRoles,\n\t}\n\n\trender.Success(w, http.StatusOK, userWithRoles)\n}\n\nfunc (handler *handler) GetMyUserDeprecated(w http.ResponseWriter, r *http.Request) {\n\trender.Error(w, errors.New(errors.TypeUnsupported, types.ErrCodeUserDeprecated,\n\t\t\"the v1 user API is deprecated; instead, get your user with GET /api/v2/users/me\"))\n}\n\nfunc (handler *handler) GetMyUser(w http.ResponseWriter, r *http.Request) {\n\tctx, cancel := context.WithTimeout(r.Context(), 10*time.Second)\n\tdefer cancel()\n\n\tclaims, err := authtypes.ClaimsFromContext(ctx)\n\tif err != nil {\n\t\trender.Error(w, err)\n\t\treturn\n\t}\n\n\tuser, err := handler.getter.GetUserByOrgIDAndID(ctx, valuer.MustNewUUID(claims.OrgID), valuer.MustNewUUID(claims.UserID))\n\tif err != nil {\n\t\trender.Error(w, err)\n\t\treturn\n\t}","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/modules/user/impluser/handler.go#L79-L115","documentation":"The v1 'get my user' endpoint is intentionally deprecated and always returns this error pointing callers to GET /api/v2/users/me. It is an unconditional TypeUnsupported response, not a conditional failure.","triggerScenarios":"Calling GET /api/v1/users/me (the deprecated handler) with any valid auth — it always returns this error.","commonSituations":"Old SDK/client versions still pinned to v1 endpoints; scripts or integrations written before the v2 migration; copy-pasted curl examples from old docs.","solutions":["Switch the client to GET /api/v2/users/me (GetMyUser handler)","Upgrade the SigLens/last9 client SDK to a version using v2 endpoints","Grep your codebase for '/api/v1/users/me' and replace all occurrences"],"exampleFix":"// before\nresp, _ := http.Get(baseURL + \"/api/v1/users/me\")\n// after\nresp, _ := http.Get(baseURL + \"/api/v2/users/me\")","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"resp, err := client.Get(baseURL + \"/api/v1/users/me\")\nif err == nil && resp.StatusCode == http.StatusUnsupportedMediaType /* deprecated marker */ {\n    resp, err = client.Get(baseURL + \"/api/v2/users/me\")\n}","preventionTips":["Pin SDK versions and subscribe to deprecation notices","Static-check codebase for v1 endpoint strings during upgrades"],"tags":["deprecation","api-versioning","user-module"],"backgroundTag":"endpoint-deprecated","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}