zm098y 3 Posted January 9 Posted January 9 (edited) I created a user and changed the user's password using the Emby API. The EmbyServer management backend showed success, but I failed to log in. I can confirm that I have enabled login for this user, and I can confirm that no other strings are mixed into the password change code. const createRes = await embyAdmin.post('/Users/New', { Name: embyUser }); const embyId = createRes.data.Id; await Promise.all([ embyAdmin.post(`/Users/${embyId}/Policy`, Policy), embyAdmin.post(`/Users/${embyId}/Configuration`, Configuration), embyAdmin.post(`/Users/${embyId}/Password`, { NewPassword: embyPass }) ]); if (field === 'emby_password') { await embyAdmin.post(`/Users/${emby_id}/Password`, { NewPassword: value }); res.json({ msg: "Emby 密码已修改" }); } Edited January 9 by zm098y
zm098y 3 Posted January 9 Author Posted January 9 const createRes = await embyAdmin.post('/Users/New', { Name: embyUser }); const embyId = createRes.data.Id; await Promise.all([ embyAdmin.post(`/Users/${embyId}/Policy`, Policy), embyAdmin.post(`/Users/${embyId}/Configuration`, Configuration), embyAdmin.post(`/Users/${embyId}/Password`, { NewPassword: embyPass }) ]); if (field === 'emby_password') { await embyAdmin.post(`/Users/${emby_id}/Password`, { NewPassword: value }); res.json({ msg: "Emby 密码已修改" }); } After changing the password, it was set to a blank password, which is not the password I need.
Luke 42077 Posted January 9 Posted January 9 Hi, did you compare your requests to what the web app sends?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now