Generate QR code with curl
Note: The method introduced below generates the QR code on the server side and returns it, so logs might be kept. Please be careful when converting confidential information such as personal information into a QR code.
Method 1
This is a method to generate a QR code in the command prompt.
qrenco.de returns a text-based response.
1
| curl qrenco.de/kenji.blog
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโ โโโโโ โ โ โ โ โโโโโ โโโโ
โโโโ โ โ โ โโโโโ โ โ โโโโ
โโโโ โโโโโ โโโโโโโ โโโโโ โโโโ
โโโโโโโโโโโโโโ โ โโโโโโโโโโโโ
โโโโโ โโโ โโโโโ โโโโโ โโโโโ
โโโโโโโโ โโ โโโโโโโโโโ โโโโโ
โโโโโโโโโโโโ โโโ โโโโโโ โโโโโ
โโโโ โโโโโ โโโ โ โโโโโ โโโโโ
โโโโ โ โ โโโ โโโโโ โโ โโโโโ
โโโโ โโโโโ โโโโ โโโโ โโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
Reference
Method 2
api.qrserver.com returns an image.
1
| curl -o qr.png "https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=HelloWorld"
|
- Output result

Reference