How do I replace the Google Charts QR code API?
Updated September 14, 2026 · 3 min read · Pro and Business
Google's Charts image API — the one that returned a QR code PNG from a plain URL with no account — is deprecated. The closest replacement here is two calls: POST /api/v1/qr-codes creates the code and returns an id, and GET /api/v1/qr-codes/{id}/image returns a 512-pixel PNG. Both need an API key, which is on the Pro and Business plans. The trade-off is real: the old URL was anonymous and produced a picture, while a QRCodeStack code belongs to your account, can be repointed after it is printed, and counts its scans.
What is different
| The old image URL | QRCodeStack API | |
|---|---|---|
| Authentication | None | Authorization: Bearer qrs_…, Pro or Business |
| Calls per code | One — the URL was the image | Two — create, then fetch the image once |
| What the pattern encodes | The text you passed | A short redirect on your account |
| Change it later | New URL, new print run | Edit the destination; the printed code follows |
| Scan data | None | Scans, devices, referrers and countries |
| Image | Sized by the request | 512-pixel PNG from the API; other sizes, SVG and PDF from the dashboard |
| Error correction | Set by the request | Fixed at the highest level |
Replace the call
Create a key under Settings → Developer settings → API, then swap your one-line image request for these two.
1. Create the code. Do this once per destination, not once per page render.
curl -X POST https://qrcodestack.com/api/v1/qr-codes \
-H "Authorization: Bearer qrs_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Invoice 1043",
"type": "url",
"destination_url": "https://example.com/invoice/1043",
"render_customizations": {
"dot_color": "#000000",
"background_color": "#FFFFFF"
}
}'Keep the returned id against your own record. You will need it to fetch the image and to change the destination later.
2. Fetch the image and store it.
curl https://qrcodestack.com/api/v1/qr-codes/{id}/image \
-H "Authorization: Bearer qrs_YOUR_KEY" \
-o invoice-1043.pngThe PNG uses the dot and background colours you set. Logos, frames and dot shapes are stored on the code but the API render is plain — download the styled file from the dashboard when you need one.
You cannot hotlink the image URL
The image endpoint requires the Authorization header, so putting it in an <img src> or an email template will render a broken image — and it would leak your key to every reader if it worked.
Fetch each image once from your server, store it in your own storage or CDN, and serve it from there. That is faster than the old image URL was anyway, and it survives any change on our side. If you are generating codes per record — invoices, tickets, assets — generate on create, not on render.
If you only need a picture, skip the API
Plenty of people used the old image URL for a handful of codes, not a pipeline. If that is you, the dashboard is quicker than writing any code: create the QR code, choose a size and format, and download PNG, SVG or a print-ready PDF. There is no API plan requirement and no key to look after.
If you need many codes at once and you are on Business, POST /api/v1/qr-codes/bulk takes up to 500 items in a single call — see creating QR codes in bulk.
Common problems
403 — API access requires a Pro or Business plan
The REST API is not on Starter or the trial. For one-off images, use the dashboard instead.
I need the raw text encoded, not a redirect
Every code the API creates is dynamic, so the pattern always encodes a redirect on our domain. If you need a pattern that holds the text itself — offline WiFi credentials, plain text, a vCard that must work with no network — create a static code in the dashboard. Static codes cannot be edited afterwards and record no scans.
The PNG is not the size I need
The API image endpoint always returns 512 pixels. Upscale a vector instead: download the SVG from the dashboard, or re-render from the same scan_url in your own toolchain.
The image URL returns 401 in a browser
Browsers do not send your API key. That endpoint is for server-to-server fetches only.
Frequently asked questions
Is there a free image URL with no sign-up?
No. Every API call needs a key, and keys are on the Pro and Business plans. The dashboard generator is the no-code route for one-off codes.
Can I control the colours?
Yes. Pass dot_color and background_color in render_customizations when you create the code; the image endpoint renders with them.
What happens to the codes if I stop paying?
Scans pause while the account has no active plan and resume when you reactivate. The printed pattern itself does not change.
Can I change the destination after printing?
Yes — PATCH /api/v1/qr-codes/{id} with a new destination_url, or edit it in the dashboard. Every printed copy follows immediately.
Where is the full reference?
At /api-docs, which renders the OpenAPI specification for every endpoint including short links and custom domains.
Related articles
How do I get started with the QRCodeStack API?
Create a key under Settings → Developer settings → API, send it as Authorization: Bearer qrs_…, and call GET /api/v1/me. Pro and Business only.
How do API keys, scopes, IP allowlists and rate limits work?
Create up to five keys under Settings → Developer settings → API. Pick scopes, optionally lock the key to IP ranges, and copy it once. Revoking is instant.
How do I create a URL QR code?
Pick URL on the Type step, paste your link into Website URL, style it, then click Download. A dynamic URL code stays editable after printing.
Static vs dynamic QR codes in QRCodeStack: which should I choose?
Dynamic encodes a redirect, so it can be edited and tracked. Static embeds the content in the pattern: no edits, no analytics, and it needs a paid plan.
Still stuck?
Email support@qrcodestack.com with the email on your account and, if it is about one code, its name or short link. A person replies within one business day, usually sooner.