HTTP-Push

This feature is available only on our Enterprise plans. If you want to know more about these plans, please contact us.

Connecting Usersnap Track with HTTP-Push

In case you are using your own bug tracking software and you want to get your screenshots delivered there, please use our HTTP-Push API.

We are sending the report as MIME multipart file-upload to your URL.

Here's how it works:

Here's how it works:

Log in to your Usersnap Track account or sign up for a free trial.

Go to your Usersnap Track project’s 3rd Party Integration tab and select Http Push from the grid.

To deliver your reports please enter a URL which accepts any script or webpage that allows multi-part file-upload.

The Security-Token parameter can be used to improve your security. We will send this parameter along with the upload request. That way you can assure that only Usersnap servers can upload information via this API.

Parameters your script can expect

  • token - your specified security token
  • file - the screenshot
  • reportid - a unique id identifying this report
  • ticketurl - link to the screen in the Usersnap dashboard
  • ticketnr - screen number
  • subject - the report subject
  • browser - the used browser version
  • ipaddress - the IP address of the user
  • referer - the HTTP referer of the report
  • senderemail - the user's email (if specified)
  • sendercomment - the user's comment (if specified)
  • additionalinfo - additional information (if specified)
  • notelist[] - the notes of the user (if any)

Example PHP script
You can use this sample PHP script which saves the report image and data into a newly created directory.


<?php
//perform a security check
//that only usersnap can access this page
if ($_POST['token'] != "MySecurityToken") {
header(
$_SERVER['SERVER_PROTOCOL'].'500 Internal Server Error',
true,
500
);
echo "no access";
} else {
//All data will be sent with a multipart form upload
$path = "./output/".time();
//create new directory
mkdir($path);
//copy screenshot to the directory
move_uploaded_file(
$_FILES['file']['tmp_name'],
$path."/".$_FILES['file']['name']
);
//dump all screenshot information
$req_dump = print_r($_POST, TRUE);
//...and save it to a file
$fp = fopen($path."/information.txt", 'w');
fwrite($fp, $req_dump);
fclose($fp);
echo "ok";
}
?>

Our servers are checking the response header. If your script returns an HTTP status which is different from 200, we will retry the delivery process several times.

HTTP-Push