sign in

API Documentation Ping Examples

Home | RecentChanges | All Pages | Help
Comparing version 6 and version 5 back

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 [[API Documentation|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.



h2. 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. h2. After transfer h3. Download from the web
{"download_id"=>"15", "video_id"=>"1018"}
Add custom fields if any. h3. Upload from the disk
{"upload_id"=>"1554564", "video_id"=>"3251"}
Add custom fields if any. h2. If error h3. Encode fails
{"job_id" => "47814", "error_code" => "106"}
If you customize the ping_url_if_error, you will also get the customized parameters. h3. Download fails
{"download_id" => "10458", "error_code" => "100"}
Add custom fields if any. h3. Discover fails
{"discover_id" => "20307"}
Add custom fields if any. h3. Upload fails
{"title"=>"my title", "upload_id" => "4565452", "error_code" => "106"}
Add custom fields if any.
Powered by JunebugWiki v0.0.18