One time token implementation

103 views
Skip to first unread message

Rj Toledo

unread,
Jun 13, 2020, 3:09:32 AM6/13/20
to Ant Media Server
Hi i followed this documentation https://github.com/ant-media/Ant-Media-Server/wiki/Stream-Security-Documentation
 
http://[IP_Address]:5080/<Application_Name>/rest/v2/broadcasts/<Stream_Id>/token?expireDate=<Expire_Date>&type=publish

and i get the token

{"tokenId":"981892898917567465169827","streamId":"483054649976374492854086","expireDate":1592229876,"type":"publish","roomId":null} I open my obs and add this url rtmp://[IP_Address]/<Application_Name>/streamID?token=tokenId and i tried to start stream
rtmp://myserver.com/test-pc/483054649976374492854086?token=981892898917567465169827
did not work

and i tried also this rtmp://myserver.com/test-pc/streamID?token=981892898917567465169827 Did not work too. what should be the correct syntax?

Selim Emre

unread,
Jun 14, 2020, 7:59:15 AM6/14/20
to Ant Media Server
Hi,

Do you able to publish RTMP without One-Time Token in OBS? I'm tried to create a new application, my application folder name created with test name. Could you please create a new application without hyphen(-)?

Best Regards,
Selim

Rj Toledo

unread,
Jun 20, 2020, 3:54:22 AM6/20/20
to Ant Media Server
Hi Selim unfortunately no. this is my app name test-pc one of your support respond to my email you recommend to use this v2 for generating token https://antmedia.io/rest/ so  this is not v2 ? http://[IP_Address]:5080/<Application_Name>/rest/v2/broadcasts/<Stream_Id>/token?expireDate=<Expire_Date>&type=publish  

Rj Toledo

unread,
Jun 21, 2020, 2:50:33 PM6/21/20
to Ant Media Server
Hi Selim,

I cant start streaming using with one time token. can you confirm below if the procedure we use is correct?

1. I Enabled Publish/Play with one time token and add our ip  in ip filtering.

2. Generating one time token using  https://antmedia.io/rest/#/BroadcastRestService/getTokenV2 

3.publishing the stream we are using vmix and i also testing it in obs and vmix. 

I attached the images steps i did to start publish with token. I cant still start the stream.






Ip filtering.png
Get Token V2.PNG
obs.PNG
vmix.PNG
vmix2.PNG

Selim Emre

unread,
Jun 22, 2020, 11:15:40 AM6/22/20
to ant-medi...@googlegroups.com
Hi,

You should add token ID, after the streaming ID. Could you please try as below? Here is the image link -> https://imgur.com/a/mIgb3ai

Screenshot from 2020-06-22 18-14-18.png



Best Regards,

Selim
Ant Media

On Saturday, June 13, 2020 at 10:09:32 AM UTC+3, Rj Toledo wrote:

Paolo Falomo

unread,
Jun 23, 2020, 9:17:55 AM6/23/20
to Ant Media Server
this fixed my issue too but please add it to the wiki https://github.com/ant-media/Ant-Media-Server/wiki
Reply all
Reply to author
Forward
0 new messages