====== API Documentation ==== Connection URL: http://omegle.com/ HTTP-Header: Host: omegle.com Content-type: application/x-www-form-urlencoded; charset=utf-8 Accept: application/json All API-Calls return JSON-Data. The Returncode for success is "win", the errorcode is "fail". ==== Commands: O --> /count \|/ --> /start() <- id / \ --> /send(id,msg) <- "win" --> /disconect(id) <- "win" --> /events(id) <- "[[msg1],...] == /start - Start a conversation URL: /start METHOD: POST PARAM: {} RETURNS: "ABCDE" ABCDE is a random string to identify the connection == /events - Poll for events URL: /events METHOD: POST PARAM: {'id':'ABCDE'} RETURNS: [[TYPE,data...],...] EXAMPLE 1: [["typing"], ["gotMessage", "im 22 m finland"]] EXAMPLE 2: [["gotMessage", "ok"]] EXAMPLE 3: [["typing"]] EXAMPLE 4: [["typing"], ["gotMessage", "hi"], ["typing"], ["gotMessage", "asl"]] EXAMPLE 5: [["waiting"], ["connected"]] Return Messagetypes: ["typing"] - Stranger is typing ["stoppedTyping"] - Stranger has stopped typing ["gotMessage", "ABCDE"] - Stranger send "ABCDE" ["waiting"] - ??? ["connected"] - ready to send messages ["strangerDisconnected"] - Stranger pressed disconnect Note: The omegle sorver is blocking the connection if no event occured. == /send - Send Message URL: /send PARAM: {'id':'ABCDE', 'msg':'ABCDE'} RETURNS: "win" "fail" == /disconnect - Disconnect/Quit Chat URL: /disconnect METHOD: POST PARAM: {'id':'ABCDE'} RETURNS: "win" "fail" == /count - Get user count URL: /count METHOD: GET PARAM: {} RETURNS: 1234 1234 is the number of users online