Skip to main content

API 1: Generate QR Code

Generate QR code API

Use this API to get a VeriDoc QR code. If the call works, you get QR data back.

Put the QR code on your file. Then save the file as a PDF in your storage.

ItemDescription
Provider End Point URIhttps://my.veridocglobal.com/api/generateqr
Interface descriptionCreate a new QR code
Mode of InterfaceRESTFUL API (JSON)
SecurityAuthorization Header: Access Key
Supports Multi-RecordsNo
Method(s)POST
Request Body Content-TypeApplication/JSON

Sample generate-qr-code request header:

Request Header

Content-Type: application/x-www-form-urlencoded
Content-Length: 0
apikey: < To enter API Key as provided by VeriDoc Global >
payload: < SHA256 HASH of (APIKEYSECRETKEY) >

Sample generate-qr-code request body:

Request Body

{
}

Body

This request has no body fields.

Generate QR code response

Field NameDescriptionMandatoryComments
returncodeRefers to the status1 - Success
Any other code (2, 3, 4, …) means auth failed or a field is missing.
qrImageBase64 PNG of the QR codeUse this to show the QR code as an image.
messageMessage describing the return codeGeneral (Testnet/Mainnet both)
- You are not authorized to perform this Action
- QR code generated successfully
- Hash does not matched
- Internal server error occured

Mainnet only
- Mainnet wallet not found.
- You are not mapped to Developer Tool template or Blockhaintype.
- You have insufficient balance to generate any more QR codes.
Please contact admin@veridocglobal.com to request more credit.
uniqueIdUnique ID for this QR code
qrVerify link encoded in the QR code.

Sample generate-qr-code response:

{
"returncode": "1",
"qrimage": "data:image/png;base64,<QR_IMAGE_BASE64>",
"message": "QR code generated successfully",
"uniqueId": "990e1fec-c8b3-468d-b332-91f62667fa73",
"qr": "https://veridocglobal.com/verify/testnet/document/990e1fec-c8b3-468d-b332-91f62667fa73"
}

More generate QR code information

  • Join your API Key and Secret Key. Do not add spaces.

    String: APIKEYSECRETKEY

    Note: Find both keys on the Dashboard. Each user has different keys.

  • Hash that string with SHA256. That hash is your payload. Send it in the header of every QR request.

    Payload: SHA256 hash of (APIKEYSECRETKEY)

    Note: Use any SHA256 tool, or ours: https://veridocglobal.com/sha256-hash-generator/

uniqueid is a GUID (a unique ID). Each QR code gets its own GUID. Two QR codes will not share the same ID.

Verify URL showing the QR code GUID

The image shows the GUID inside the verify URL.

Each response includes:

  • A verify URL used to make the QR code (“QR”)
  • A QR image you can place on the file (“QRImage”)
  • A return code. 1 means success. Any other number means a field was missing or you are not allowed.
  • The unique ID (GUID) and a message.