#!/bin/bash

EMBED_KEY="MY_EMBED_API_KEY" # replace it with you Embed API key
SECRET="MY_SECRET" # replace it with your Secret

URL="https://browshot.com/" # URL must be encoded appropriately
OPTIONS="width=300&size=page"

TOKEN=$(echo -n "url=$URL&$OPTIONS$SECRET" | md5sum | cut -d " " -f 1)

curl "https://api.thumbalizr.com/api/v1/embed/$EMBED_KEY/$TOKEN/?url=$URL&$OPTIONS"

# sh thumbalizr.sh > thumbnail.png