Jump to content

Emby connect request format


joggs

Recommended Posts

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 by joggs
Link to comment
Share on other sites

Since you don't already support Emby Connect i would wait. We are soon to announce major changes to the service. Thanks.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...