•   Mountain View 1600, CA 94043
  •   +1 650-253-0000
  •   name@example.com
   Search
   
Login
Thumbshots
  • Pricing
  • Support
    • -Integration
    • -FAQ
    • -Blog
    • -Articles
    • -Update Thumbshots
You are here: Support ⁄ Integration

Index

  • HTML Integration
  • URL Encryption
  • Required Attribution

HTML Integration

Thumbshots are simply images you can embed to your HTML pages. To request an image, you need to specify your API Key in the &cid= parameter. You can find your API Key in your accounts page. You must also append your desired URL to generate in the &url= parameter. Values containing special characters should be encoded to avoid conflicting with the usual characters in the URL.

https://images.thumbshots.com/image.aspx?v=1&cid=abc1234&url=http%3A%2F%2Fwww.yahoo.com

API References

Image requests should pull from https://images.thumbshots.com/image.aspx? with the query string parameters listed below.

Parameter Required Description Examples
&v= Yes Version number. Always 1. 1
&cid= Yes API Key aa1234bb
&url= Yes The desired URL to generate image for. You should specify the full URL including the http:// or https:// protocol. If you don't specify the protocol, the system will assume the http:// protocol. www.yahoo.com
http://www.yahoo.com
http://www.site.com/some/page
&w= No The image width to generate between 60 to 480 pixels. Defaults to 120 if not specified. 480
&xurl= No If URL Encryption feature is enabled, you must provide the encrypted URL value here. If using &xurl=, you can omit the &url= parameter. See URL Encryption section for more information. sacdsd89321ujd923ijl

Examples

Typically you would embed the image with your HTML next to your links.

<img src="https://images.thumbshots.com/image.aspx?v=1&cid=abc1234&url=http%3A%2F%2Fwww.yahoo.com" style="vertical-align: middle" /><a href="http://www.yahoo.com">Visit Yahoo</a>

<img src="https://images.thumbshots.com/image.aspx?v=1&cid=abc1234&url=http%3A%2F%2Fwww.aol.com" style="vertical-align: middle" /><a href="http://www.aol.com">Visit AOL</a>

<img src="https://images.thumbshots.com/image.aspx?v=1&cid=abc1234&url=http%3A%2F%2Fwww.cnn.com" style="vertical-align: middle" /><a href="http://www.nbcnews.com">Visit CNN</a>

Specifying a different size

You can request a different image size using the &w= parameter by specifying a custom width from 60 to 480 pixels. The default size is 120 pixels.

https://images.thumbshots.com/image.aspx?v=1&cid=AA11BB&url=http%3A%2F%2Fwww.yahoo.com&w=120

 

 

URL Encryption (advanced option)

You can prevent unauthorized sites from pulling your Thumbshots images by enabling the URL Encryption feature in your account settings. Once enabled, all your image requests must use the special &xurl= parameter with the encrypted URL value instead of the usual &url= parameter. 

To generate the encrypted URL value, you start by encrypting your desired URL using Triple DES (ECB mode, IV 00000000) and your Secret Key followed by encoding the final value in Base 64. The Secret Key is configured in your account settings. Since you are the sole holder of the Secret Key, only you are able to generate the encrypted URL value. See the example below:

PHP Example

// Encrypt the url using your secret key
$url = mcrypt_encrypt(MCRYPT_3DES, $secretkey, $url, MCRYPT_MODE_ECB, "00000000");
// base64 encode $url = base64_encode($url);
print '<img src="http://images.thumbshots.com/image.aspx?...&xurl=' . urlencode($url) . '"/>';

ASP.NET Example

using System; 
using System.Text; 
using System.Security.Cryptography; 
...
...
string url = "http://www.cnn.com";  TripleDESCryptoServiceProvider tripleDES = new TripleDESCryptoServiceProvider();  tripleDES.Padding = PaddingMode.Zeros; tripleDES.Mode = CipherMode.ECB; tripleDES.IV = Encoding.ASCII.GetBytes("00000000"); 
// Set your secret key  tripleDES.Key = Encoding.ASCII.GetBytes(secretKey); 
// Pass the URL you want to encrypt  byte[] decryptedData = Encoding.ASCII.GetBytes(url); 
// Encrypt and convert to base64 encoded url = Convert.ToBase64String(tripleDES.CreateEncryptor().TransformFinalBlock(decryptedData, 0, decryptedData.Length)); 
img.src = "http://images.thumbshots.com/image.aspx?...&xurl=" + Page.Server.UrlEncode(url);

 

 

Required Attribution Code for FREE Plan

Users running the FREE Thumbshots plan must include the following attribution code on every page that uses the Thumbshots service. The attribution is a simple discreet text link and can be placed at the footer of your page. If attribution is missing, the Thumbshots may stop working. Once suspended, it may take over 30 days before our bots revisit your site.

<a href="http://www.thumbshots.com">Thumbnail Screenshots by Thumbshots</a>

Don't want attribution? Try our Premium service from $4.99. Compare the differences between paid and free Thumbshots.


 

 

Thumbshots : Terms Of Use : Privacy Statement

Company

About Us
Testimonials
Portfolio
Press Release

Follow us on Pinterest Follow us on Twitter Follow us at Facebook

Thumbshots : Terms Of Use : Privacy Statement