sign in

API Documentation Ping Examples

Home | RecentChanges | All Pages | Help

After an encode, a transfer or an error, you can receive info to the URL you set (account page, developer tab) using POST method. You can find the error codes here.

Note that you can add custom fields in discover and download requests to get them back in the ping parameters. Very useful to track your user or other objects by your side.

All the custom fields are sent via GET because they’re added to the ping URL like “http://youhost.com/ping.php?custom_field=50&custom_field2=455”. So in PHP, to get back the custom fields, use $_GET[“custom_field2”]. For other “normal” parameter use $_POST.

Here are examples for each ping.

After encode

{
 "encoded_video_id"=>"98400", 
 "filename" => "HeyWatch_filename.mp4",
 "link" => "http://heywatch.com/encoded_video/98400.bin",
 "video_id" => "95740",
 "job_id" => "38456" 
}

If you customize the ping_url_after_encode, you will also get the customized parameters.

After transfer

Download from the web

{"download_id"=>"15", "video_id"=>"1018"}

Add custom fields if any.

Upload from the disk

{"upload_id"=>"1554564", "video_id"=>"3251"}

Add custom fields if any.

If error

Encode fails

{"job_id" => "47814", "error_code" => "106"}

If you customize the ping_url_if_error, you will also get the customized parameters.

Download fails

{"download_id" => "10458", "error_code" => "100"}

Add custom fields if any.

Discover fails

{"discover_id" => "20307"}

Add custom fields if any.

Upload fails

{"title"=>"my title", "upload_id" => "4565452", "error_code" => "106"}

Add custom fields if any.


Powered by JunebugWiki v0.0.18 Last edited by y_vani2005 on October 17, 2007 12:13 PM (diff)
Version 6 (current) «olderversions