joggs 24 Posted October 7, 2018 Share Posted October 7, 2018 (edited) Hi, I am trying to login with emby connect with the API. The documentation is vague, so could the responsible please tell me how you should do this: "X-Application header, formatted as AppName/AppVersion" You cannot add it as httpClient.DefaultRequestHeaders.Add("X-Application", "AppName/1.0"); nor in json format httpClient.DefaultRequestHeaders.Add("X-Application", "{ AppName: blabla, AppVersion: 1.0 }"); The response I get {StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Access-Control-Allow-Headers: Content-Type, Range, X-Connect-Token, X-Connect-UserToken, X-Application Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS Access-Control-Allow-Origin: * Connection: keep-alive Date: Sun, 07 Oct 2018 14:33:11 GMT Keep-Alive: timeout=60 Server: nginx X-Android-Received-Millis: 1538922790626 X-Android-Response-Source: NETWORK 400 X-Android-Selected-Protocol: http/1.1 X-Android-Sent-Millis: 1538922790321 X-Powered-By: PHP/5.5.9-1ubuntu4.22 Content-Length: 0 Content-Type: text/html }}" " Login with username & password Send a POST to https://connect.emby.media/service/user/authenticate The content type should be application/json, and here is an example structure: { nameOrEmail: username, rawpw: password } The request headers should contain the following: X-Application header, formatted as AppName/AppVersion" Edited October 7, 2018 by joggs Link to comment Share on other sites More sharing options...
joggs 24 Posted October 7, 2018 Author Share Posted October 7, 2018 Getting 400 with this curl command when changing to my login and pass. curl -i -H "Content-Type: application/json" -H "X-Application: FAKEAPPNAME/0.0.1" -X POST -d '{"nameOrEmail":"MYUSERNAME","rawpw":"NOTMYPASSWORD"}' https://connect.emby.media/service/user/authenticate -v Link to comment Share on other sites More sharing options...
Luke 37025 Posted October 7, 2018 Share Posted October 7, 2018 Since you don't already support Emby Connect i would wait. We are soon to announce major changes to the service. Thanks. 1 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