Documentation

    Amazon Web Services

    Microsoft Azure

    RapidAPI

    APILayer

Last Update: 2024-09-24

QR Code Generator API


Table of Content


Subscribe on AWS Marketplace
Code sample
API endpoint: /static/create
API endpoint: /dynamic/create
API endpoint: /dynamic/update
API endpoint: /dynamic/track
API endpoint: /usage
Troubleshooting

Subscribe on AWS Marketplace


Navigate to our product listing on the AWS Marketplace. Select the "View purchase options" button to proceed.

On the following page, click the "Subscribe" button to initiate the subscription process.

After subscribing, you will need to set up your account on our platform. Do this by clicking the "Set up your account" link provided.

You will be directed to the registration page. Here, fill in your account details in the provided fields. Once you have entered all necessary information, click the 'Subscribe' button to proceed.

Upon successful registration, your unique API key will be displayed. It is crucial to store this key in a secure location for future use.

Code Samples


The following code sample demonstrates how to create a dynamic QR code that points to this documentation page with our logo. The destination URL can be changed without altering the actual QR code image. Additionally, you can track how many times the QR code has been scanned.

. Replace <YourApiKey> with the actual API Key you received during the sign-up process.

var client = new RestClient("https://qrcode-aws.silverlining.cloud/dynamic/create");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<YourApiKey>");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@"    ""content"": ""https://www.silverlining.cloud/docs/aws/qrcode""," + "\n" +
@"    ""background_color"": ""#4D4D4E""," + "\n" +
@"    ""fill_color"": ""#FFFFFF""," + "\n" +
@"    ""image_url"": ""https://s3.amazonaws.com/cdn.silverlining.cloud/Square_Dark-CLOUD3-white-background.png""" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Generate QR Code Endpoint Playground

This API Playground for our QR Code API allows you to generate custom QR codes in real-time. Simply input the content you'd like encoded, along with any optional parameters such as size or color, and receive a QR code directly from the API. Whether you're integrating QR code generation into your application or just experimenting with different configurations, the playground offers a user-friendly interface for instant results.

"To see the result, please send a request to the API."
API endpoint: /static/create


URL endpoint: https://qrcode-aws.silverlining.cloud/static/create


Method: POST


"header": {
  "x-api-key": STRING,
  "Content-Type": "application/json"
}


"body": {
  "content": STRING,
  "background_color": STRING,
  "fill_color": STRING,
  "image_url": STRING,
  "error_correction": STRING,
  "border": NUMBER,
  "box_size": NUMBER,
  "return_as_file": BOOLEAN
}



Required

"content": The content to be represented in the QR code.


Optional

"background_color": The background color of the QR code in RGB hex format, preceded by a # (e.g., #4D4D4E). Default is white.
"fill_color": The color of the QR code tiles in RGB hex format, preceded by a # (e.g., #EDEDED). Default is black.
"image_url": A link to a publicly available image that will be placed at the center of the QR code.
"error_correction": Defines the error correction capability of the QR code, ensuring it remains readable even if slightly damaged or obscured. Acceptable values are "Low" (7% of codewords can be restored), "Medium" (15% of codewords can be restored), "Quartile" (25% of codewords can be restored), and "High" (30% of codewords can be restored). Higher error correction levels produce denser QR codes. The default value is "Low".
"border": Specifies the width of the QR code's border filled with the background_colour. Default value is 4.
"box_size": Determines the size of each individual box within the QR code grid, adjusting the overall QR code scale. Default value is 10.
"return_as_file": This parameter controls the format in which the QR Code is delivered. When set to `true`, the API will return the QR Code as a downloadable image file, providing immediate access to the QR Code in a ready-to-use format. In contrast, if set to `false` (or not specified), the API will return a URL pointing to the image of the QR Code, requiring an additional step to access the image file.



Response:

"body": {
  "qrcode_url": STRING,
  "metadata": {
    "content": STRING,
    "background_color": STRING,
    "fill_color": STRING,
    "logo_url": STRING,
    "error_correction": STRING,
    "border": NUMBER,
    "box_size": NUMBER,
    "return_as_file": BOOLEAN
  }
}   


"qrcode_url": The link to the created QR code, available for download.
"content": The content represented on the QR code.
"background_color":The background color used for the QR code.
"fill_color": The tile color used for the QR code.
"logo_url": The link to the used image. Returns None if not present.
"error_correction": The error correction method used.
"border": Width of the border in pixels.
"box_size": Size of each individual box in the grid in pixels.

API endpoint: /dynamic/create


URL endpoint: https://qrcode-aws.silverlining.cloud/dynamic/create


Method: POST


"header": {
  "x-api-key": STRING,
  "Content-Type": "application/json"
}


"body": {
  "content": STRING,
  "background_color": STRING,
  "fill_color": STRING,
  "image_url": STRING,
  "error_correction": STRING,
  "border": NUMBER,
  "box_size": NUMBER,
  "return_as_file": BOOLEAN
}


Required

"content": The destination URL to which the QR code should redirect the user. This must be a valid URL, including the protocol (http:// or https://).


Optional

"background_color": The background color of the QR code in RGB hex format, preceded by a # (e.g., #4D4D4E). Default is white.
"fill_color": The color of the QR code tiles in RGB hex format, preceded by a # (e.g., #EDEDED). Default is black.
"image_url": A link to a publicly available image that will be placed at the center of the QR code.
"error_correction": Defines the error correction capability of the QR code, ensuring it remains readable even if slightly damaged or obscured. Acceptable values are "Low" (7% of codewords can be restored), "Medium" (15% of codewords can be restored), "Quartile" (25% of codewords can be restored), and "High" (30% of codewords can be restored). Higher error correction levels produce denser QR codes. The default value is "Low".
"border": Specifies the width of the QR code's border filled with the background_colour. Default value is 4.
"box_size": Determines the size of each individual box within the QR code grid, adjusting the overall QR code scale. Default value is 10.
"return_as_file": This parameter controls the format in which the QR Code is delivered. When set to `true`, the API will return the QR Code as a downloadable image file, providing immediate access to the QR Code in a ready-to-use format. In contrast, if set to `false` (or not specified), the API will return a URL pointing to the image of the QR Code, requiring an additional step to access the image file.

Response:

"body": {
  "qrcode_url": STRING,
  "metadata": {
    "content": STRING,
    "redirection_url": STRING,
    "key": STRING,
    "background_color": STRING,
    "fill_color": STRING,
    "logo_url": STRING,
    "error_correction": STRING,
    "border": NUMBER,
    "box_size": NUMBER,
    "return_as_file": BOOLEAN
  }
}   


"qrcode_url": The link to the created QR code, available for download.
"content": The destination URL where the QR code redirects.
"redirection_url": The public URL represented on the QR code.
"key": A unique key associated with the QR code, which must be provided to the /track and /update endpoints.
"background_color": The background color used for the QR code.
"fill_color": The tile color used for the QR code.
"logo_url": The link to the used image. Returns None if not present.
"error_correction": The error correction method used.
"border": Width of the border in pixels.
"box_size": Size of each individual box in the grid in pixels.

API endpoint: /dynamic/update


URL endpoint: https://qrcode-aws.silverlining.cloud/dynamic/update


Method: POST


"header": {
  "x-api-key": STRING,
  "Content-Type": "application/json"
}


"body": {
  "new_content": STRING,
  "key": STRING
}


Required

"new_content": The updated destination URL to which the QR code should redirect the user. This must be a valid URL, including the protocol (http:// or https://).
"key": The key of the QR code that needs to be updated.

Response:

"body": {
  "message": "The content of the QR Code has been updated",
  "metadata": {
    "content": STRING,
    "redirection_url": STRING,
    "key": STRING
  }
}   


"content": The destination URL where the QR code redirects.
"redirection_url": The public URL represented on the QR code.
"key": A unique key associated with the QR code, which must be provided to the /track and /update endpoints.

API endpoint: /dynamic/track


URL endpoint: https://qrcode-aws.silverlining.cloud/dynamic/track


Method: POST


"header": {
  "x-api-key": STRING,
  "Content-Type": "application/json"
}


"body": {
  "key": STRING
}


Required

"key": The key of the QR code.

Response:

"body": {
  "totalHits": NUMBER,
  "metadata": {
    "content": STRING,
    "redirection_url": STRING,
    "key": STRING
  },
  "hits": [{
    "date": DATE,
    "time": TIME,
    "ip": STRING,
    "method": STRING,
    "resource": STRING,
    "referrer": STRING,
    "user": {
      "platform": {
        "name": STRING,
        "version": STRING,
      },
      "os": {
        "name": STRING,
      },
      "bot": BOOLEAN,
      "flavour": {
        "name": STRING,
        "version": STRING,
      },
      "browser": {
        "name": STRING,
        "version": STRING
      }
    },
    "rawUserAgent": STRING,
    "timeTaken": FLOAT
  } ... ],
}   


"totalHits": The number of successfully registered scans.
"content": The destination URL where the QR code redirects.
"redirection_url": The public URL represented on the QR code.
"key": A unique key associated with the QR code, which must be provided to the /track and /update endpoints.
"hits: A list of actual clicks, consisting of the date and time the URL was clicked, the IP address of the click, the referring URL, and detailed information about the user's device.

API endpoint: Usage

URL endpoint: https://qrcode-aws.silverlining.cloud/usage


Method: POST


"header": {
  "x-api-key": STRING,
  "Content-Type": "application/json"
}

Required 
You must include the API key in the x-api-key header. The body parameters can be left empty.

Response:


"body": {
  "reportUrl": STRING,
  "downloadLink": STRING,
  "description": STRING
}

"reportUrl": A URL linking to a web-based report that displays all requests made to the API. Note that this report is only accessible if the total number of requests is below 100,000.

"downloadLink": A URL to download a .CSV file containing all requests made to our API using the specified API key.

"description": You can access usage statistics either by visiting the website using the 'reportUrl' or by downloading the usage data as a .csv file using the 'downloadLink'. Please note that, depending on the number of requests you have previously sent to our API, these links may become available up to 10 minutes after the request is made.

Troubleshooting

"message": "Invalid Input: The request contains incorrectly formatted parameters"

This error message means that the body parameters you have passed are malformed. Please follow the instructions given in the endpoint descriptions. Common issues include forgetting to add a comma (',') after every parameter line or missing a parenthesis somewhere.

"message": "Endpoint request timed out"

You receive this error message when the code execution exceeds the maximum timeout (usually 29 seconds).

How can I cancel my subscription?

To cancel your subscription, follow these steps:

  1. Go to the AWS Marketplace Console at https://aws.amazon.com/marketplace/library. Ensure that you are logged into the account that is subscribed to the product you want to cancel.
  2. Find the product you want to cancel and click on 'Manage.'
  3. Click on 'Actions' and then select 'Cancel subscription.'

For more detailed instructions, visit the AWS Marketplace Buyer Guide at https://docs.aws.amazon.com/marketplace/latest/buyerguide/cancel-subscription.html.