Help Center

Every little secret about Usersnap

Connecting Usersnap 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.

httppush webhooks usersnap

To deliver your reports please enter a URL which accepts any script or webpage which accepts a 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 the usersnap servers can upload informations via this API.

Parameters your script can expect

  • token - your specified security token
  • file - the screenshot
  • reportid - a unique id identifying this report
  • 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.

//perform a security check
//that only usersnap can access this page
if ($_POST['token'] != "MySecurityToken") {
    $_SERVER['SERVER_PROTOCOL'].'500 Internal Server Error',
  echo "no access";
} else {
  //All data will be sent with a multipart form upload
  $path = "./output/".time();
  //create new directory
  //copy screenshot to the directory
  //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);
  echo "ok";

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

Let's connect and get in touch!