aahmyu 9 Posted October 24, 2017 Share Posted October 24, 2017 Hello, im trying to use "postman" to try to get an access token im sending a post request to "Users/AuthenticateByName" in the body im sending { "username": "test", "password": "" } i keep getting a response of "Invalid user or password entered." And yes ive read this page: https://github.com/MediaBrowser/Emby/wiki/Authentication Thanks Link to comment Share on other sites More sharing options...
ebr 14929 Posted October 24, 2017 Share Posted October 24, 2017 What are you really trying to accomplish? i.e. Why do you want to get an access token? Link to comment Share on other sites More sharing options...
aahmyu 9 Posted October 24, 2017 Author Share Posted October 24, 2017 (edited) What are you really trying to accomplish? i.e. Why do you want to get an access token? atm nothing really. just want to explore a bit in the api. I probably want to do something when i have time. can you tell me what im missing? i added the headers same as in the docs and still doesnt work. and also i cant use swagger endpoints at all without the access token. so thats why i want one. Thanks Edited October 24, 2017 by aahmyu Link to comment Share on other sites More sharing options...
ebr 14929 Posted October 24, 2017 Share Posted October 24, 2017 also i cant use swagger endpoints at all without the access token. so thats why i want one. Okay, that's what I wanted to know because there are easier ways to make that work. In the server there is a "Security" section where you can generate an API key that can then be used for things like swagger. As for your auth call, assuming all the headers are correct, it doesn't look like you did this: The password must be sent in the body, in three different form fields: pw - password in plain text password - password in Sha1 passwordMd5 - password in MD5 IMPORTANT - The Emby login API is in a state of transition, and this is why three different forms of the password are required. Beginning April 1, 2018, only the "pw" param will be required. Until then, all three are needed in order to support both newer and older servers. Link to comment Share on other sites More sharing options...
aahmyu 9 Posted October 24, 2017 Author Share Posted October 24, 2017 Okay, that's what I wanted to know because there are easier ways to make that work. In the server there is a "Security" section where you can generate an API key that can then be used for things like swagger. As for your auth call, assuming all the headers are correct, it doesn't look like you did this: thanks for your reply i tried doing this. but i keep getting this "Value cannot be null. Parameter name: appName"? im using the same headers as from the docs. Link to comment Share on other sites More sharing options...
ebr 14929 Posted October 24, 2017 Share Posted October 24, 2017 Add that to the header. It is missing from the doc. Link to comment Share on other sites More sharing options...
thatoneguy99 33 Posted November 11, 2017 Share Posted November 11, 2017 Did you ever get this going? Sent from my phone! Link to comment Share on other sites More sharing options...
aahmyu 9 Posted November 11, 2017 Author Share Posted November 11, 2017 Did you ever get this going? Sent from my phone! Yeah. but im not sure if its the right way to do it but it works. My problems were happening because of bad headers These headers worked for me: { Content-Type: application/json X-Emby-Authorization: MediaBrowser Client="Android", Device="Samsung Galaxy SIII", DeviceId="xxx", Version="1.0.0.0" } And in the body you need this: {"Password":"","PasswordMd5":"","Username":"","Pw":""} Make sure to fill the user name and passwords if you have password for the user Hope this helps Link to comment Share on other sites More sharing options...
Luke 37112 Posted November 11, 2017 Share Posted November 11, 2017 Well done. These instructions are also available on our wiki: https://github.com/MediaBrowser/Emby/wiki/Authentication Thanks ! Link to comment Share on other sites More sharing options...
Luke 37112 Posted July 6, 2018 Share Posted July 6, 2018 Swagger params are finally back and better then ever: https://emby.media/community/index.php?/topic/60520-34127-swagger-params/ Enjoy. Link to comment Share on other sites More sharing options...
jervaise 0 Posted January 11, 2020 Share Posted January 11, 2020 Add that to the header. It is missing from the doc. I was trying in Swagger, added the appName but still getting Value cannot be null. (Parameter 'appName'). Is there something else to add? Link to comment Share on other sites More sharing options...
Luke 37112 Posted January 11, 2020 Share Posted January 11, 2020 Yes, everything mentioned here: https://github.com/MediaBrowser/Emby/wiki/Authentication Please let us know if this helps. Thanks. Link to comment Share on other sites More sharing options...
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