Skip to content

Commit f5478ef

Browse files
authored
Update png-to-zpl.py
1 parent defae79 commit f5478ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

png-to-zpl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
with open(image_path, 'rb') as f:
1111
image_bytes = f.read()
1212

13+
token = '00000000-0000-0000-0000-000000000000' # TODO: Replace with your API key
1314
url = 'https://www.labelzoom.net/api/v2/convert/png/to/zpl'
14-
headers = { 'Content-Type': 'image/png', 'Accept': 'text/plain' }
15+
headers = { 'Content-Type': 'image/png', 'Accept': 'text/plain', 'Authorization': f'Bearer {token}' }
1516
response = requests.post(url, data=image_bytes, headers=headers)
1617

1718
try:

0 commit comments

Comments
 (0)