Jump to content

create an API access using a single URL


Recommended Posts

Hi guys.

First of all let me congratulate all the Emby team for your amazing work. I got the server installed inside my company for content delivering and is working like a charm but im struggling now with a first problem that i would appreciate you could help me with.

I have an Ant server running a webrtc application wich uses java, RED5 and websocket to connect video, from and betweeen html5 clients and the server. 

STRM file pointing to the player doesnt work and i havent found a way to simply publish and open a hyperlink inside the home screen so an embeded player in a website could do the rest. So far i have only been able to publish HLS streams using IPTV plugin and LiveTV (I bought the premiere subscription) wich works fine for scenarios where a 10-30 seconds delays is acetpable.

So, after an extensive reading of the forum i found out that "linking" the home page its not possible (so far at least), so i made an external website where im publishing the webrtc streams wich i need to link to the emby server somehow.

Here is where i need some help:

Can you explain me how to build an API call that can get a user directly to the emby home screen from an external link ?, I need the API URL link contains the username and password so i can put that on a button in my own application, so that the user thats already logged in (in my intranet) dont have to double log once is beeing transported to emby (using offcourse the Emby authentication).

Any lights on the problem will be appreciate. Im a complete newby in API usage, so im being very humble in asking a detailes "how to", even if its sound a little dumb for the oracles of the Emby comunnity.

Thank you.

 

Link to post
Share on other sites

Its useless...every time i try to POST something to the API i get the same response, even having the appName parameter inside the query:

image.thumb.png.5bd954042d9343e04fd2be05eb65b33b.png

The headers are configured as the wiki says (https://github.com/MediaBrowser/Emby/wiki/User-Authentication) :

image.thumb.png.0cd5746004fd764f0bd4bcb1a09dcd6c.png

API key:

image.thumb.png.2a5e3e4df5c742d84c7073f73c7544c4.png

 

CODE:

curl --location --request POST 'https://MY_SERVER:8920/emby/users/authenticateByName?appName=Emby&pw=password&username=mrfloppy&testing=a0030ad87f8740f2afaf6c174700f6a0' \
--header 'Client: Android' \
--header 'Device: Samsung Galaxy SIII' \
--header 'DeviceId: xxx' \
--header 'Version: 1.0.0.0' \
--header 'UserId: d4c77a14f7bd41cc93be730cd764d496'

The string is going out like this:

https://MY_SERVER:8920/emby/users/authenticateByName?appName=Emby&pw=password&username=mrfloppy

swagger is messy...i prefer postman.

Can somebody give some pointers here?, i need to authenitcate the user before i can send him to Emby once he clicks on the link in my website.

Im stuck in this:

image.png.c25140f7446007ad9a11a075862e1b3a.png

 

 

 

 

 

 

Edited by mrfloppy
bad upload
Link to post
Share on other sites
Quote

STRM file pointing to the player doesnt work

Hi, it has to point to the raw media url.

Link to post
Share on other sites
Quote

Can you explain me how to build an API call that can get a user directly to the emby home screen from an external link ?

Without them actually logging in it's not currently possible.

Link to post
Share on other sites

thank you.

i actually found out that the error was on the headers, find a solution in this post:

 

I cant use any other headers rather that: 

Emby Client="Login-testing", Device="testing", DeviceId="4567", Version="1234"

headers shown on the wiki doesnt work for AuthenticateByName


 

Link to post
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...