LogoLogo
  • ๐Ÿ‘ฅAbout us
  • ๐Ÿ’พChangelogs
    • ๐ŸŒAPI
    • ๐Ÿ“ฒModule
  • โ›”Rate-Limit
  • โœจStart with the NPM module
  • Module
    • ๐Ÿ“ธImages
      • ๐ŸฌAnimals
    • ๐ŸŽฎGames
      • ๐ŸŽฎGarry's Mod
      • ๐ŸŽฎMinecraft
      • ๐ŸŽฎFiveM
  • Joke
    • ๐ŸคฃJokes
      • ๐ŸŽฒRandom
      • ๐Ÿ“‹Category
      • ๐Ÿ†”ID
  • Images
    • ๐Ÿ™Animals
      • ๐Ÿ•Dog
      • ๐ŸˆCat
      • ๐ŸฆŠFox
      • ๐Ÿฆ’Giraffe
      • ๐Ÿฆ˜Kangaroo
      • ๐ŸฆLion
      • ๐Ÿ’Quokka
      • ๐ŸบWolf
      • ๐ŸฆŽLรฉzard
      • ๐Ÿ†Lรฉopard
      • ๐Ÿ’Singes
      • ๐ŸฆšPaon
      • ๐ŸนHamster
    • ๐Ÿฅ˜SFW
      • ๐ŸŽฒRandom
      • ๐Ÿ“‹Category
      • ๐Ÿ†”ID
    • ๐Ÿ”žNSFW
      • ๐ŸŽฒRandom
      • ๐Ÿ“‹Category
      • ๐Ÿ†”ID
    • ๐Ÿ—๏ธUtils
      • ๐Ÿ“ธQR Code
        • ๐Ÿ”Generator
        • ๐Ÿ“ƒReader
      • ๐Ÿ”Captcha
      • โ„น๏ธIP infos
  • Games
    • ๐ŸŽฎGames
      • ๐ŸŽฎGarry's Mod
      • ๐ŸŽฎMinecraft
      • ๐ŸŽฎFiveM
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Images
  2. Utils
  3. QR Code

Reader

With the QRcode reader you can verify if the link is not dangerous for you or users

Read a QR Code

GET https://api.night-api.com/images/qrcode/reader

Headers

Name
Type
Description

authorization*

String

Your API key

Request Body

Name
Type
Description

image*

Buffer or URL

The image in Buffer or URL.

{
    "status": 200,
    "content": {
        "type": "link",
        "target": "https://night-api.com",
        "status": "Safe" // Status of danger on website by google AI
    }
}
{
    "status": 400,
    "content": "Invalid Key"
}
{
    "status": 200,
    "content": {
        "type": "geo", // Type of the QRcode
        "data": { // The QRcode but with tried data by the API (change beetween different QRcode data)
            "latitude": "48.85837",
            "longitude": "2.29448"
        },
        "target": "geo:48.85837,2.29448" // The data of the QRcode
    }
}
const axios = require("axios");
const { readFileSync } = require("fs");

axios.get('https://api.night-api.com/images/qrcode/reader', {
    headers: {
        authorization: "Your API token"
    },
    data: {
        image: readFileSync(`${__dirname}/qrcode.png`)
    }
})
.then(function (response) {
    console.log(response.data);
})

Or with the module

const { readFileSync } = require('fs');
const { NightAPI } = require('night-api');
const api = new NightAPI("API_key");
const qrcode = readFileSync('./qrcode.png');


const QRcode_infos = api.qrcode.read(qrcode);

// OR with QRcode URL

const QRcode_infos = api.qrcode.read("https://mydomain.com/qrcode.png");

console.log(QRcode_infos);

PS: read function take Buffer or URL parameter

PreviousGeneratorNextCaptcha

Last updated 2 years ago

Was this helpful?

๐Ÿ—๏ธ
๐Ÿ“ธ
๐Ÿ“ƒ