?>
Take control here. Enjoy the show!

BattleCam API v1

By default server returns response in JSON

Method: init

Method: get-eula-text

Method: keep-alive

Method: register

Method: login

Method: logout

Method: get-group-list

Method: get-room-list

Method: enter-room

Method: get-room-stream

Method: get-room-votes

Method: get-new-messages

Method: toggle-user-queue

Method: vote

Method: send-message

Method: leave-room

Method: get-archives-by-room-id

Method: get-archives-by-user-id

Method: get-stand-by-videos

Method: get-user-info

Method: video-search

Method: init

  • Link: http://www.battlecam.com/api/init
  • Description: Init new API session.
    Received session_key should be added to each further API request, otherwise all requests will fail with http response HTTP/1.1 403 Forbidden
  • GET Parameters:
    • appName: application name.
    • appVersion: application version.
  • Success response:
    {
        "result":200,
        "reason":"",
        "body":{
            "config":{
                "app_version":"1",
                "api_version":"1.0",
                "eula_version":1,
                "fb_app_id":"107187176024768",
                "force_wifi":false,
                "site_url":"http:\/\/www.battlecam.com\/"
            },
            "session_key":"random_unique_session_key_provided_by_server"
        }
    }
                    

Method: get-eula-text

  • Link: http://www.battlecam.com/api/get-eula-text
  • Description: Returns EULA text
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": {
            "eula_text": "Text"
        }
    }
                    

Method: keep-alive

  • Link: http://www.battlecam.com/api/keep-alive
  • Description: Keeps user session alive
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": true
    }
                    

Method: register

  • Link: http://www.battlecam.com/api/register
  • Description: User registration
  • GET Parameters:
    • email: user email.
    • password: user password.
    • nickname: user nickname.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": true
    }
                    
  • Fail response:
    {
        "result": 400,
        "reason": "Wrong user registration data",
        "body": [ ]
    }
                    

Method: login

  • Link: http://www.battlecam.com/api/login
  • Description: Authorization.
  • GET Parameters:
    • login: user login.
    • password: user password.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": {
            "user_info": {
                "id": "3895337",
                "email": "misotteli-9747@yopmail.com",
                "login": "misotteli-9747@yopmail.com",
                "fullname": "misotteli-9747 misotteli-9747",
                "nickname": "misotteli-9747",
                "is_online": true,
                "country": "",
                "city": "",
                "channel_url": "http://www.battlecam.com/misotteli-9747",
                "channel_id": "3424256",
                "points": 0,
                "dollars": 0,
                "rank": "94172",
                "image": "http://static.battlecam.com/image-path.jpg",
                "is_admin": false
            }
        }
    }
                    
  • Fail response:
    {
        "result": 400,
        "reason": "Wrong Login/Password combination",
        "body": [ ]
    }
                    

Method: logout

  • Link: http://www.battlecam.com/api/logout
  • Description: User logout.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": true
    }
                    
  • Fail response:
    {
        "result": 403,
        "reason": "User not Authorized",
        "body": [ ]
    }
                    

Method: get-group-list

  • Link: http://www.battlecam.com/api/get-group-list
  • Description: Returns group list.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": [
            {
                "group_id": 1,
                "title": "group name",
                "slug": "group-alias",
                "weight": 2
            }
        ]
    }
                    

Method: get-room-list

  • Link: http://www.battlecam.com/api/get-room-list
  • Description: Room list request.
  • GET Parameters:
    • rooms_limit: Returned rooms limit.
    • group_id: group id. default 0.
    • live_only: 1 or 0 return only live rooms. default 0.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": [
            {
                "room_id": 1,
                "title": "room name",
                "owner_id": 3093690,
                "is_private": false,
                "is_live": true,
                "owner_nickname": "room-alias",
                "users_count": 35,
                "guests_count": 18000,
                "screenshot": "http://static.battlecam.com/image-path.jpg"
            }
        ]
    }
                    

Method: enter-room

  • Link: http://www.battlecam.com/api/enter-room
  • Description: Room enter, switches user room he's currently in.
  • GET Parameters:
    • room_id: room id.
    • password: Private room password.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": {
            "room": {
                "id": 1,
                "title": "room name",
                "owner_id": "3093690",
                "owner_nickname": "room-alias",
                "delay_chat_messages": 0,
                "private_on": false,
                "fight_mode_on": true,
                "voting_on": true,
                "line_up_on": true,
                "chat_on": true,
                "fight_mode_active": true,
                "total_audience": 16037,
                "stream_user_id": "3171806",
                "url": "http://www.battlecam.com/room-alias",
                "standby_images": [
                    "http://www.battlecam.com/image-path.jpg"
                ]
            },
            "broadcasters": {
                "primary": {
                    "id": "3171806",
                    "email": "brtbrt@aol.com",
                    "login": "zeroping1",
                    "fullname": "real_justin i own",
                    "nickname": "real_justin",
                    "is_online": true,
                    "country": "AF",
                    "city": "",
                    "channel_url": "http://www.battlecam.com/real_justin",
                    "channel_id": "3199879",
                    "points": "271242",
                    "dollars": "5530",
                    "rank": "29",
                    "image": "http://static.battlecam.com/image-path.jpg",
                    "is_admin": false,
                    "broadcast_time": 38
                },
                "secondary": {
                    "id": "3585887",
                    "email": "tjmooney33@gmail.com",
                    "login": "tjmooney33@gmail.com",
                    "fullname": "moonusdingus thomas Mooney",
                    "nickname": "moonusdingus",
                    "is_online": true,
                    "country": "US",
                    "city": "San Diego",
                    "channel_url": "http://www.battlecam.com/moonusdingus",
                    "channel_id": "3312557",
                    "points": "4593",
                    "dollars": "1561",
                    "rank": "1793",
                    "image": "http://static.battlecam.com/image-path.jpg",
                    "is_admin": false,
                    "broadcast_time": 38
                }
            },
            "stream": {
                "server_url": "rtmp://server-addr/battlecam/",
                "stream_primary": "bc_1",
                "stream_secondary": "bc_1s",
                "stream_owner": "bc_1o"
            },
            "lineup": [
                {
                    "id": "3585887",
                    "email": "tjmooney33@gmail.com",
                    "login": "tjmooney33@gmail.com",
                    "fullname": "moonusdingus thomas Mooney",
                    "nickname": "moonusdingus",
                    "is_online": true,
                    "country": "US",
                    "city": "San Diego",
                    "channel_url": "http://www.battlecam.com/moonusdingus",
                    "channel_id": "3312557",
                    "points": "4593",
                    "dollars": "1561",
                    "rank": "1793",
                    "image": "http://static.battlecam.com/image-path.jpg",
                    "is_admin": false
                }
            ]
        }
    }
                    

Method: get-room-stream

  • Link: http://www.battlecam.com/api/get-room-stream
  • Description: Get room broadcaster stream data to view.
  • GET Parameters:
    • stream_type: Type of requested stream ( one of 'http', 'rtmp', 'rtsp', 'livehttp ). default rtmp.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": {
            "server_url": "rtmp://server-addr/battlecam/",
            "stream_primary": "bc_1",
            "stream_secondary": "bc_1s",
            "stream_owner": "bc_1o"
        }
    }
                    
  • Fail response:
    {
        "result": 410,
        "reason": "Gone",
        "body": [ ]
    }
                    

Method: get-room-votes

  • Link: http://www.battlecam.com/api/get-room-votes
  • Description: Returns room vote data
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": {
            "yes": "0",
            "no": "480",
            "total_cnt": "1",
            "is_fight_mode": "0"
        }
    }
                    
  • Fail response:
    {
        "result": 400,
        "reason": "error message",
        "body": [ ]
    }
                    

Method: get-new-messages

  • Link: http://www.battlecam.com/api/get-new-messages
  • Description: Returns new messages and room commands.
  • GET Parameters:
    • last_msg_id: last message id.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": {
            "messages": [
                {
                    id": "568855694",
                    "pdate": "1406560052",
                    "user_id": "3714152",
                    "user_ip": null,
                    "msg": "Message text",
                    "user_to": null,
                    "geo_country_code": "us",
                    "geo_country_code_image": "http://www.battlecam.com/image-path.png",
                    "whitelabel_title": "Battlecam",
                    "whitelabel_image": "http://static.battlecam.com/image-path.ico",
                    "user_name": "SKUNKYBUDDY",
                    "type": 0,
                    "nickname_colour": "blue",
                    "boss": "",
                    "polit": "",
                    "loser": "<img src="http://static.battlecam.com/image-path.gif" />",
                    "ui_boss": "",
                    "ui_polit": "",
                    "ui_loser": "<span class="ui chat-labels loser">loser</span>",
                    "user_badge_id": "js12_3714152"
                }
            ],
            "commands": [
                {
                    "code": "userEnter",
                    "params": {
                        "code": "userEnter",
                        "user_id": "3189283",
                        "avatar": "\"\"",
                        "profile_url": "http://www.battlecam.dev/profile/3189283",
                        "is_broadcaster": false,
                        "user_name": "vitalik"
                    },
                    "id": "418499040"
                }
            ],
            "last_chat_msg_id": 568856099
        }
    }
                    
  • Fail response:
    {
        "result": 410,
        "reason": "Gone",
        "body": [ ]
    }
                    

Method: toggle-user-queue

  • Link: http://www.battlecam.com/api/toggle-user-queue
  • Description: Toggle user in lineup queue
  • GET Parameters:
    • action: optional ['add', 'remove']. default NULL.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": {
            "success": false,
            "action": "add",
            "reason": "Sorry, only group of users managed by room owner is allowed to broadcast",
            "prevent": true
        }
    }
                    
  • Fail response:
    {
        "result": 400,
        "reason": "room_id must be numerical",
        "body": [ ]
    }
                    

Method: vote

  • Link: http://www.battlecam.com/api/vote
  • Description: Vote for user in current room
  • GET Parameters:
    • vote_type: >0 is like and <=0 is poop.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": true
    }
                    
  • Fail response:
    {
        "result": 400,
        "reason": "vote_type is required",
        "body": [ ]
    }
                    

Method: send-message

  • Link: http://www.battlecam.com/api/send-message
  • Description: Send a chat message in current room
  • GET Parameters:
    • message: message text.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": true
    }
                    
  • Fail response:
    {
        "result": 403,
        "reason": "Authorization failed",
        "body": [ ]
    }
                    

Method: leave-room

  • Link: http://www.battlecam.com/api/leave-room
  • Description: Notify system about user leaving room
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": true
    }
                    
  • Fail response:
    {
        "result": 400,
        "reason": "You're not inside the room",
        "body": [ ]
    }
                    

Method: get-archives-by-room-id

  • Link: http://www.battlecam.com/api/get-archives-by-room-id
  • Description: Get room archive videos
  • GET Parameters:
    • room_id: room id.
    • order: 1 or 0 (Order archive videos. 1 is for new, 0 is for old) default 1.
    • limit: Archive videos return limit.
    • offset: Archive videos offset, default 0.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": [
            {
                "id": "4417586",
                "user_id": "3171806",
                "user_name": "real_justin",
                "room_id": "1",
                "date_time": "2014-07-28 14:27:08",
                "screenshot": "http://static.battlecam.com/image-path.jpg",
                "type": "flv",
                "link_download": "http://cloud.battlecam.com/file-path.flv",
                "link_stream": "http://cloud.battlecam.com/file-path.flv"
            }
        ]
    }
                    

Method: get-archives-by-user-id

  • Link: http://www.battlecam.com/api/get-archives-by-user-id
  • Description: Get specified user videos.
  • GET Parameters:
    • user_id: user id.
    • order: 1 or 0 (Order archive videos. 1 is for new, 0 is for old) default 1.
    • limit: Archive videos return limit.
    • offset: Archive videos offset, default 0.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": [
            {
                "id": "4417586",
                "user_id": "3171806",
                "user_name": "real_justin",
                "room_id": "1",
                "date_time": "2014-07-28 14:27:08",
                "screenshot": "http://static.battlecam.com/image-path.jpg",
                "type": "flv",
                "link_download": "http://cloud.battlecam.com/file-path.flv",
                "link_stream": "http://cloud.battlecam.com/file-path.flv"
            }
        ]
    }
                    

Method: get-stand-by-videos

  • Link: http://www.battlecam.com/api/get-stand-by-videos
  • Description: Get standby videos for room
  • GET Parameters:
    • room_id: room id. default NULL (for current room).
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": [
            {
                "streamName": "http://cloud.battlecam.com/file-path.flv"
            },
            {
                "streamName": "mp4:file-path.mp4",
                "streamURL": "rtmp://server-addr/streamer/"
            }
        ]
    }
                    
  • Fail response:
    {
        "result": 410,
        "reason": "Gone",
        "body": [ ]
    }
                    

Method: get-user-info

  • Link: http://www.battlecam.com/api/get-user-info
  • Description: Get user information.
  • GET Parameters:
    • user_id: user id.
  • Success response:
    {
        "result": 200,
        "reason": "",
        "body": {
            "user_info": {
                "id": "3093690",
                "email": "alki@filmon.com",
                "login": "alki",
                "fullname": "alkidavid A David",
                "nickname": "alkidavid",
                "is_online": true,
                "country": "US",
                "city": "",
                "channel_url": "http://www.battlecam.com/alkidavid",
                "channel_id": "1",
                "points": "204351",
                "dollars": "4083",
                "rank": "53",
                "image": "http://static.battlecam.com/image-path.jpg",
                "is_admin": true
            }
        }
    }
                    
  • Fail response:
    {
        "result": 400,
        "reason": "User ID should be numerical",
        "body": [ ]
    }
                    

Method: video-search

  • Link: http://www.battlecam.com/api/video-search
  • Description: Return videos list by query.
  • GET Parameters:
    • term: search string.
    • start: video list offset.
    • max_results: video list items limit.
    • order: parameter for order search result (one of 'most-recent', 'most-viewed', 'top', 'most-discussed'). default NULL.
    • filter_time: filter name (one of 'all', 'today', 'week', 'month'). default 'all'.
    • jsonp: JavaScript function name how will call if need response in JSONP format. Default NULL.
  • Success response:
    callback({
        "result": 200,
        "reason": "",
        "body": {
            "status": 0,
            "total": 65,
            "total_found": 65,
            "error": "",
            "warning": "",
            "time": 0,
            "matches": [
                {
                    "id": 31736,
                    "title": "Battlecam.com`s 4th Annual Halloween Costume Contest 2013",
                    "description": "GangstaGangstaMcGilacuty aka Ruen,1Natasha , Musicbattle, AJ, Fattoothless, Cjulia, Sugar, OGHotAsianGirl, Trumphant, 2High4Life, Cattitude, Westside, devilishmilf, TheRealScott77 aka Loukiboy, Erin as Christopher Reeves, OGLadybugs, Chrisgetit as Tony Romo, Pricelessone, Anneurysm as Alex from the movie Clockwork Orange, Tapatio, Croft, Glazed",
                    "timepoint": 1383361830,
                    "published_at": 1383361830,
                    "watches": 56072,
                    "votes": 3,
                    "vote_average": 10,
                    "virt_views": 0,
                    "virt_views_hour": 0,
                    "duration": 0,
                    "count_comments": 0,
                    "owner": {
                        "id": "3173444",
                        "nickname": "BestOfBattleCam",
                        "fullname": "BestOfBattleCam BestOfBattleCam",
                        "profile_url": "http://www.battlecam.dev/profile/3173444",
                        "videos_url": "http://www.battlecam.dev/profile/videos/3173444",
                        "avatar": {
                            "205x308": "http://www.battlecam.dev/image-path.jpg",
                            "150x150": "http://www.battlecam.dev/image-path.jpg",
                            "105x105": "http://www.battlecam.dev/image-path.jpg"
                        }
                    },
                    "url": "http://www.battlecam.dev/video/31736",
                    "images": {
                        "cover": "http://www.battlecam.dev/image-path.jpg"
                    }
                }
            ]
        }
    })
                    
Restore password
Edit Video
Change views
Upload Video Cover
Change Video Owner

Friendship request
Private Message