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.
| Item | Description |
|---|---|
| Provider End Point URI | https://my.veridocglobal.com/api/generateqr |
| Interface description | Create a new QR code |
| Mode of Interface | RESTFUL API (JSON) |
| Security | Authorization Header: Access Key |
| Supports Multi-Records | No |
| Method(s) | POST |
| Request Body Content-Type | Application/JSON |
Sample generate-qr-code request header:
Request Header
Content-Type: application/x-www-form-urlencodedContent-Length: 0apikey: < 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 Name | Description | Mandatory | Comments |
|---|---|---|---|
| returncode | Refers to the status | 1 - Success Any other code (2, 3, 4, …) means auth failed or a field is missing. | |
| qrImage | Base64 PNG of the QR code | Use this to show the QR code as an image. | |
| message | Message describing the return code | General (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. | |
| uniqueId | Unique ID for this QR code | ||
| qr | Verify 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.

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.