Jump to content
  • 0

One time token implementation


Rj Toledo
 Share

Question

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=981892898917567465169827Did not work too. what should be the correct syntax?

Link to comment
Share on other sites

  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 0
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

On Saturday, June 13, 2020 at 10:09:32 AM UTC+3, Rj Toledo wrote:
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=981892898917567465169827Did not work too. what should be the correct syntax?

Link to comment
Share on other sites

  • 0
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  

On Sunday, June 14, 2020 at 6:59:15 PM UTC+7, Selim Emre wrote:
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

On Saturday, June 13, 2020 at 10:09:32 AM UTC+3, Rj Toledo wrote:
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=981892898917567465169827Did not work too. what should be the correct syntax?

Link to comment
Share on other sites

  • 0
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.













774567365_Ipfiltering.png.46bbdacc7224989b5db41a79ef5f795d.png

930362208_GetTokenV2.thumb.PNG.3b7014403e6aa45aa7536c38e9d7842f.PNG

obs.thumb.PNG.9bbe8513e08ec2967159e89bf5f38f9f.PNG

vmix.PNG.d8c3b0844093342578544d1742a2288f.PNG

vmix2.PNG.7c515fabf000833d2e4391086299d575.PNG

Link to comment
Share on other sites

  • 0
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



Best Regards,

Selim
Ant Media

On Saturday, June 13, 2020 at 10:09:32 AM UTC+3, Rj Toledo wrote:
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=981892898917567465169827Did not work too. what should be the correct syntax?




1296892345_Screenshotfrom2020-06-2218-14-18.thumb.png.87f32e4c9ee4b12dec32f1691ff3cfa6.png

Link to comment
Share on other sites

 Share

×
×
  • Create New...