New Embed API
We've added the Embed API to make it easier to embed thumbnails on your website. While the existing API (now called Old API) will continue to be supported, we encourage all our customers to use the Embed API for new projects.
All the API options are pretty much the same as the old API: url, width, etc. We have added two options:
- country: you can take screenshots from Germany or the USA. We will add more countries later.
- timestamp: you can assign a string (up to 35 characters) to a screenshot. This is used to figure out whether a new screenshot needs to be created or an older screenshot can be rendered. If you want a new screenshot every month, you can use the current month and year, for example 2017-05, as a timestamp. When you change the timestamp to 2017-06, a new screenshot will be taken and rendered for the rest of the month.
You don't have to set all the options. The default values are taken from your profile.
Checking for error
Like in the Old API, the screenshot status and error (if any) are sent as HTTP response headers: X-Thumbalizr-Status and X-Thumbalizr-Error. But many users had troubles checking these headers. Now, the error message is shown on the thumbnail:
Actual error message when using the wrong embed API key
Embed API key and secret
In addition to your current private API key for the Old API, you now have a new public Embed key and a private Secret. Both can be found in the Member section.
The embed API key is public, meaning it can be shared with anybody without compromising your account. But the Secret is ... a secret! It must be private and never shared. The Embed API uses your Embed key to identify the user and a token, a kind of signature derived from your Secret, to ensure that the screenshot request really comes from the user identified.