Htmlmage API

API for converting HTML to images.

This API aims to convert HTML to images using Puppeteer as it’s backend to make “screenshots”.

Domain: htmlmage.davidrychly.cz

Endpoints:

  • /url - POST - get screenshot of the URL
  • /html - POST - get screenshot of page from the HTML
  • /auth/signup - POST - registration of the user
  • /auth/signin - POST - login of the user
/url endpoint

This endpoint accepts following parameters via JSON POST request:

  • url - required
    Pass URL address of page which you want to render in the result image
  • width - optional
    Pass desired headless browser viewport width
  • height - optional
    Pass desired headless browser viewport height
  • scaleFactor - optional
    Pass desired headless browser viewport scaleFactor
  • waitTimeout - optional
    Pass desired browser wait timeout for page load (in ms)

There is too need to provide “Authorization Bearer token”, this token can be obtained at endpoint /auth/sigin

/html endpoint

This endpoint accepts following parameters via JSON POST request:

  • html - required
    Pass HTML which you want to render in the result image
  • width - optional
    Pass desired headless browser viewport width
  • height - optional
    Pass desired headless browser viewport height
  • scaleFactor - optional
    Pass desired headless browser viewport scaleFactor
  • waitTimeout - optional
    Pass desired browser wait timeout for page load (in ms)

There is too need to provide “Authorization Bearer token”, this token can be obtained at endpoint /auth/sigin

/auth/signup endpoint

This endpoint accepts following parameters via JSON POST request:

  • username - required
    Pass your desired username
  • email - required
    Pass your e-mail address
  • password - required
    Pass your desired password
/auth/signin endpoint

This endpoint accepts following parameters via JSON POST request:

  • username - required
    Pass your username
  • password - required
    Pass your password

Response is JSON object containing your “accessToken”.

{
  "id":"USER_ID",
  "username":"USERNAME",
  "email":"USER_EMAIL",
  "accessToken":"USER_ACCESS_TOKEN"
}
Top