Generate QR Codes
After creating a short link, you can generate a QR Code for it via the API. QR Code colors and file type options may be available depending on your subscription plan.
Creating a QR Code for a short link
A QR Code is generated at the individual link level using the GET method to the /v4/bitlinks/{bitlink}/qr endpoint.
GET /v4/bitlinks/{bitlink}/qr
Parameters
You may be able to include additional query parameters in the request to customize the QR Code, depending on your subscription plan.
bitlink string
A Bitlink made of the domain and hash. This field is required.
color string
A color denoted in hexadecimal RGB format. There is no need to include the # sign. Additionally if no color is given, we default to black: 000000.
exclude_bitly_logo bool
Removes the Bitly logo from the center of the generated QR image, either true or false.
image_format string
Determines the image format of the returned QR Code, either png or svg.
GET /v4/bitlinks/{bitlink}/qr?color=0000ff&exclude_bitly_logo=true&image_format=svg
A successful response will include a Base64 encoded image.
{
"created": "string",
"modified": "string",
"id": "string",
"link": "string",
"qr_code": "data:image/png;base64,string",
"customization": {
"logo_image_guid": "",
"color": "",
"image_format": "",
"exclude_bitly_logo": false
}
}
Link metrics
To retrieve the short link’s metrics, call the click data for the link behind the QR code with a call like GET /v4/bitlinks/{bitlink}/clicks. Review the Retrieve metrics section for more options.
The list of endpoints and available parameters is available in our API reference.