web api problem

Problems with Unreal Media Server

web api problem

Postby tasoss » Tue Nov 13, 2018 7:01 am

Hello.
I'm trying to use session based auth but it doesn't seem to work.
I have seen your example and via a c# app i'm sending the following request

https://ipaddress:4443/webapi_604ca2e71 ... c293b029ea
Command=AddSession&Password=foobar&SecureToken=thisisasecuretoken&UserName=tasoss&UserLogID=tasoss

The username tasoss exists.I have changed the port to 4443 and it's opened on the firewall.
I have also checked Accept secure(HTTPS) connections only.
I get HttpStatusCode.OK but then when i'm trying to play a video i get
User not authorized to play this resource.
I have set Player.UseSessionID(_uMediaToken);
and the channel to be played is set to session-based authentication.

Any ideas please?
tasoss
 
Posts: 0
Joined: Wed Jul 05, 2017 3:41 pm

Re: web api problem

Postby tasoss » Tue Nov 13, 2018 7:28 am

I would like to inform you that after unchecking "accept secure(https) connections only" everything works.
I still send the request as https.
I would like to enable https only access.
So do you have any ideas about the problem?
tasoss
 
Posts: 0
Joined: Wed Jul 05, 2017 3:41 pm

Re: web api problem

Postby admin » Tue Nov 13, 2018 9:44 am

Hello,

If you select "accept secure(https) connections only" then the player also needs to connect via HTTPS.
so you need to have Player.UseHTTPS() on the webpage.
admin
Site Admin
 
Posts: 1030
Joined: Fri Aug 21, 2009 10:13 am

Re: web api problem

Postby tasoss » Tue Nov 13, 2018 10:24 am

Thanks for replying.
After using UseHTTPS() now i'm getting an error that the media server doesn't respond.
I can see that you try to connect to port 443.
Is there a way to change the target port?
Or maybe i'm missing something.
Thanks again!
tasoss
 
Posts: 0
Joined: Wed Jul 05, 2017 3:41 pm

Re: web api problem

Postby admin » Tue Nov 13, 2018 10:33 am

Make sure your secure port in Unreal Media Server (443 by default) is not used by other applications (like IIS). If that's the case, you will have a record in event log, saying that Unreal Media Server is unable to listen on 443. Change the port then in Unreal Media Server or that other app, to resolve the conflict.

Specify the correct port on the webpage, like:
Player.UseMediaServer("65.23.154.147:444");
admin
Site Admin
 
Posts: 1030
Joined: Fri Aug 21, 2009 10:13 am

Re: web api problem

Postby tasoss » Tue Nov 13, 2018 10:47 am

Indeed.
The UseMediaServer(ip+port) thing did the trick.
Thanks!
tasoss
 
Posts: 0
Joined: Wed Jul 05, 2017 3:41 pm


Return to Experience and troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests

cron