QR Code Generation via API

How to generate QR codes using the TTA HTTP API.

Example Request

const axios = require('axios');
    
    const options = {
      method: 'GET',
      url: 'https://text-to-anything.p.rapidapi.com/generateQR',
      params: {
        content: 'https://google.nl',
        lightColor: 'cecece',
        darkColor: '000000',
        margin: '4',
        width: '100'
      },
      headers: {
        'x-rapidapi-key': '{Your-RapidAPI-Key}',
      }
    };
    
    const response = await axios.request(options);
    console.log(response.data);

Inside of the operation you have the following options:

OptionTypeDescription
contentstring The content of the QRCode.
lightColorstring Used as the background of the QRCode.
darkColorstring Used for the symbols inside of the QRCode.
marginnumber The offset around the QRCode.
widthnumber The width of the QRCode.

Output

The endpoint will return the generated file as result.