To get the account and server information make GET request to the following URL:
https://hub.api.caster.fm/private/accountInfo?token={PRIVATE_TOKEN}
If the request is successful an HTTP status code 200 will be returned along with the following JSON:
{ "name": "Some User", "email": "[email protected]", "public_token": "97824ed0-ee56-4d2c-ba29-efbcb76794c5", "streaming_server_port": 10002, "streaming_server_ready": 0, "channels_count": 2, "streaming_server": { "id": "2d1f4206-95a3-4dd7-9b27-651df07ccbf6", "name": "Sapir", "area": "US-Washington", "domain": "sapircast.caster.fm", "ip_address": "173.244.216.28" }, "channels": [ { "id": "27b44a7c-b2f5-4934-91a5-887f93073b70", "name": "Rock Radio", "timezone": "Asia/Jerusalem", "country": "AX", "language": "ace", "genre": "kids_and_family", "streaming_server_mountpoint": "Li2Yn", "streaming_server_password": "DhkhAQ2TKh" } ], "subscription": { "plan_id": "premium-xl", "addons_count": 1, "listeners_slots": 500, "max_channels": 4, "bitrate": 128, "podcasts_recorder": { "duration": 3, "amount": 15, "protected": false }, "protected_stream": false, "plan_name": "Premium - XL", "addons": [ { "addon_id": "additional-broadcast-channel-XL", "quantity": 3, "addon_name": "Additional Broadcast Channels" } ] } }
- public_token – the public token will be used to render widgets
- streaming_server_port – the port of your Icecast 2 server
streaming_server – Your streaming server details.
- domain – the server hostname/domain name
- ip_address – the server ip address
Channels – An array of your channels.
- id – the internal channel id, required for getting the recorded podcasts for the channel
- streaming_server_mountpoint – the Icecast 2 mount-point name
- streaming_server_password – the Icecast 2 broadcast password
subscription – Your account subscription information and limits
- listeners_slots – maximum listeners slots for each channel
- bitrate – maximum broadcast bitrate for each channel
- protected_stream – if FALSE, it means that the direct stream link is available and don’t require an auth code to listen.
- podcasts_recorder[duration] – maximum duration in hours of recorded podcasts
- podcasts_recorder[amount] – maximum number of recorded podcasts for each channel
Fields That Are Required For Broadcasting
Since each channel is an Icecast 2 Mount-Point, you need to broadcast to each channel separately.
Below is a mapping of the fields required to setup your broadcast software.
Server Host/IP => streaming_server[domain]
Port => streaming_server_port
Username => “source”
Mount-Point => / + channels[X][streaming_server_mountpoint]
(eg. if the value of the streaming_server_mountpoint field is Li2Yn, the mount-point you will need to set at your broadcast software is /Li2Yn )
Password => channels[X][streaming_server_password]