Authentication
To authenticate, send an API key as a Bearer token. For conversions, the key is optional.
Create an API key
Section titled “Create an API key”To create a key in the dashboard:
- Sign in to the LabelZoom dashboard.
- In the API Keys section, click Create new key.
- Optional: In Name, enter a name for the key.
- In Environment, keep the default, Live, or select Test.
- Optional: To use Cloud Print, in Scopes, select print.
- Click Create key, and then copy the key. The dashboard shows the full key only once.
Keep keys out of client-side code and version control. Load them from an environment variable or a secret store.
Send your key
Section titled “Send your key”Send the key in the Authorization header:
Authorization: Bearer API_KEYEvery SDK reads the key from the LABELZOOM_API_KEY environment variable.
Key types
Section titled “Key types”Live keys and test keys produce the same output for your plan. Use live keys in production. If your account is on Pro or above when you create a live key, conversion requests made with that key aren’t stored; see Data retention.
Scopes control what a key can call:
| Scope | Allows |
|---|---|
convert |
Conversions, and reading and converting templates. Every key has it. |
print |
Cloud Print. Includes convert. |
Troubleshooting
Section titled “Troubleshooting”| Symptom | Fix |
|---|---|
| Output has a watermark | Check that the key is set, spelled correctly, and not revoked, and that your account has a paid plan. A bad key doesn’t fail: the request converts anonymously on the free tier. |
403 response |
Use a key that has the scope the endpoint needs, or a plan that includes the feature. |
401 response |
Send a valid key. Only Cloud Print endpoints and URL-to-ZPL conversions return 401. Some Cloud Print actions work only in the dashboard; see Authentication and scopes. |