{"record":{"id":"4ba953362086f8b4","repo":"AlistGo/alist","slug":"api-login-and-api-key-are-required","errorCode":null,"errorMessage":"api_login and api_key are required","messagePattern":"api_login and api_key are required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/streamtape/driver.go","lineNumber":39,"sourceCode":"\ntype Streamtape struct {\n\tmodel.Storage\n\tAddition\n}\n\nvar waitMoreSecondsRe = regexp.MustCompile(`wait\\s+(\\d+)\\s+more\\s+seconds?`)\n\nfunc (d *Streamtape) Config() driver.Config {\n\treturn config\n}\n\nfunc (d *Streamtape) GetAddition() driver.Additional {\n\treturn &d.Addition\n}\n\nfunc (d *Streamtape) Init(ctx context.Context) error {\n\tif strings.TrimSpace(d.APILogin) == \"\" || strings.TrimSpace(d.APIKey) == \"\" {\n\t\treturn errors.New(\"api_login and api_key are required\")\n\t}\n\tif d.RootFolderID == \"\" {\n\t\td.RootFolderID = \"0\"\n\t}\n\n\tvar account accountInfo\n\tif err := d.callAPI(ctx, \"/account/info\", nil, &account); err != nil {\n\t\treturn err\n\t}\n\n\top.MustSaveDriverStorage(d)\n\treturn nil\n}\n\nfunc (d *Streamtape) Drop(ctx context.Context) error {\n\treturn nil\n}\n","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/streamtape/driver.go#L21-L57","documentation":"Streamtape driver Init() refuses to start when either the API login (username) or the API key is missing/whitespace. Streamtape's remote-upload API authenticates every call with the api_login/api_key pair taken from the Streamtape dashboard, so there is nothing the driver can do without them; Init fails before the first /account/info call.","triggerScenarios":"Adding a Streamtape storage with an empty 'api_login' or 'api_key' addition field; saving the storage after the fields were cleared; copy-pasting the key with only whitespace characters.","commonSituations":"User never generated API credentials at streamtape.com > My Account > Settings > API; Confusing the account password with the API key; Leading/trailing spaces or newlines pasted into the config fields (only TrimSpace-checked, mismatched key still passes this guard but fails later at /account/info)","solutions":["Log in to streamtape.com, enable API access, copy login + key into the storage's addition fields","Trim any accidental whitespace when pasting","Re-save the storage so Init re-runs and validates via /account/info"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if strings.TrimSpace(addition.APILogin) == \"\" || strings.TrimSpace(addition.APIKey) == \"\" {\n    return errors.New(\"fill api_login and api_key from streamtape.com > Settings > API before adding this storage\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate API credentials in the Streamtape dashboard before adding the storage","Paste values without surrounding whitespace","Re-run Init (re-save storage) after entering credentials to validate them against /account/info"],"tags":["streamtape","config","credentials","init"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}