Skip to main content

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 URLQRCodeStack API
AuthenticationNoneAuthorization: Bearer qrs_…, Pro or Business
Calls per codeOne — the URL was the imageTwo — create, then fetch the image once
What the pattern encodesThe text you passedA short redirect on your account
Change it laterNew URL, new print runEdit the destination; the printed code follows
Scan dataNoneScans, devices, referrers and countries
ImageSized by the request512-pixel PNG from the API; other sizes, SVG and PDF from the dashboard
Error correctionSet by the requestFixed 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.png

The 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.

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.