nanocosmos Documentation

nanocosmos Documentation

  • nanoStream Cloud
  • H5Live Player
  • nanoStream Webcaster
  • nanoMeet
  • nanoStream Apps and SDKs
  • Samples
  • FAQ

›Bintu API

nanoStream Cloud

  • Overview
  • Latest News
  • Introduction
  • Getting started
  • Live Encoding
  • SRT Ingest
  • Live Recording and VOD
  • Security Features

    • nanoStream Cloud Security
    • nanoStream Guardian

    Analytics

    • General
    • Worldmap
    • Zoom
    • Troubleshooting
    • Guardian
    • Analytics API

Cloud Dashboard

  • Getting started
  • Cloud Dashboard Overview
  • How-to

    • Start streaming
    • Stream List
    • Adaptive Bitrate
    • Secure Playback Tokens
    • nanoStream Cloud Tags
    • Embed nanoPlayer Code
    • nanoStream Webcaster

Bintu API

  • bintu api
  • bintu custom web hooks
  • bintu.live Stream Tags

Support

  • Network Diagnostics
  • Support

Video Tutorials

  • How to Setup a Low Latency Stream
  • Analytics For Low Latency Streams
  • How To Setup Streamgroups Through V3 Dashboard
  • How to Setup Optimal Latency Modes for Streaming
  • How To Setup Ingest Security For Your Live Streams
  • Implement Playback Security For Your Live Streams
  • Defend Against Misuse With nanoStream Guardian
Edit

bintu custom web hooks

It's possible to use a custom web hook for custom based authentication.

NOTE: using web hooks is the recommended way to protect your ingest workflow. Ask us for account upgrades to help with implementations or hosting

NOTE: using web hooks for playback is not recommended and not always enabled. Use nanoPlayer Token Security instead.

API

Set the custom web hook via this api call (linux notation):

curl -X PUT \
https://bintu.nanocosmos.de/organisation/webhook \
-H 'content-type: application/json' \
-H 'x-bintu-apikey: YOUR_BINTU_API_KEY' \
-d '{
    "webhook": "https://your-custom-server.com/hook"
}'

NOTES:

  • The custom api call will be called from bintu for each on_play, on_publish, on_play_done, on_publish_done and on_publish_update webhook.
  • It's a blocking api call. You need to ensure quick response times. Long response times from the customer api server will create a delay for the time required to start a playout or publish.
  • The customer api hook needs to reply with http status code 200, otherwise the bintu api will reject this stream and it's not possible to publish or play the stream.
  • The custom api server should response with 200 to accept a stream and with 403 to reject a stream.

Bintu will send a POST request with header Content-Type: application/x-www-form-urlencoded and body will contain url encoded form data as in the following example:

call=publish&name=CD6xx-123456&type=live&app=live&addr=xxx.yyy.zzz.aaa&clientid=123456

For the publish_done webhook, the request body also contains the keys bytes_in and bytes_out. The unit of the values is byte.

Custom data

Its possible to amend this body with custom fields/data by adding the data as query parameter to the stream-name.

Example for publish:

rtmp://bintu-stream.nanocosmos.de:80/live/CD6xx-123456?foo=bar&batz=12345

This stream name will result in the request body below:

foo=bar&batz=12345&call=publish&name=CD6xx-123456&type=live&app=live&tcurl=rtmp%3A%2F%2Fbintu-stream.nanocosmos.de%3A1935%2Flive
&addr=xxx.yyy.zzz.aaa&clientid=123456    

Example for play:

http://demo.nanocosmos.de/nanoplayer/release/nanoplayer.html?h5live.server=bintu-play.nanocosmos.de&h5live.rtmp.url=rtmp://bintu-play.nanocosmos.de/play&h5live.rtmp.streamname=CD6xx-123456?test%3D123

Which will result in the request body below:

test=123&call=play&name=CD6xx-123456&start=0&duration=0&reset=0&app=play&addr=xxx.yyy.zzz.aaa&clientid=123456    

Note: you might need to url encode your parameters, e.g. test=123 needs to be url encoded: test%3D123

Parameters

  • call: 'play_done', Webhook play, publish, play_done, publish_done, update_publish
  • name: 'YYstV-BVPq4', stream name
  • bytes_in: '575', Bytes, received by rtmp server
  • bytes_out: '8516372', Bytes sent by rtmp server
  • addr: '17.31.43.214', Client IP Addr
  • clientid: '9466245' internal client id (displayed in log and stat)
  • time: '46807', number of seconds since play/publish call
  • timestamp: '46805903', timestamp of the last audio/video packet sent to the client

Available Parameters per Webhook

Webhook play:

  • call
  • name
  • start
  • duration
  • app
  • addr
  • clientid

Webhook play_done:

  • call
  • name
  • bytes_in
  • bytes_out
  • app
  • addr
  • clientid

Webhook publish:

  • call
  • name
  • app
  • addr
  • clientid

Webhook publish_done:

  • call
  • name
  • bytes_in
  • bytes_out
  • app
  • addr
  • clientid

Webhook update_publish:

  • call
  • time
  • timestamp
  • name
  • app
  • addr
  • clientid
Last updated on 9/11/2023
← bintu apibintu.live Stream Tags →
  • Custom data
    • Example for publish:
    • Example for play:
  • Parameters
  • Available Parameters per Webhook
Contact
HomepageContactSupportLegal Terms
Products
Nanostream Cloud with Bintu.LiveH5Live Low Latency HTML5-PlayernanoStream WebcasterNanostream Apps and SDK
More
BlogTwitterFacebookLinkedInGitHubStar
nanocosmos GmbH
Copyright © 2023 nanocosmos GmbH - doc version Mon Sep 11 2023 09:43:20 GMT+0000 (Coordinated Universal Time)