Subscribe on Azure Marketplace
Code samples
API endpoint: Shorten
API endpoint: Remove
API endpoint: Tracking
API endpoint: Usage
Custom Domain Integration
Troubleshooting
Visit our listings page on the Azure Marketplace and click on 'Get It Now'.
In the Azure portal, choose a plan depending on whether you wish to implement your own custom domain, then click on 'Subscribe'.
Select a resource group, give the subscription an internal name, and click on 'Review + subscribe'.
Click on 'Subscribe' to finalize your subscription.
Begin creating your account on our platform by clicking on 'Configure account now'.
You will be directed to the registration page. Here, fill in your account details in the provided fields. After entering all necessary information, click on 'Subscribe' 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.
The following code samples creates a short URL with a random key. The link will expire after 24 hours. Replace <YourApiKey> with the actual API Key you received during the sign-up process:
var client = new RestClient("https://api.azr.link/shorten"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Ocp-Apim-Subscription-Key", "<YourApiKey>"); request.AddHeader("Content-Type", "application/json"); var body = @"{" + "\n" + @" ""longUrl"": ""https://www.silverlining.cloud/docs/azure/azr-link""," + "\n" + @" ""expireHours"": 24" + "\n" + @"}"; request.AddParameter("application/json", body, ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);
This API Playground for our URL shortener enables you to interact with the API directly from your browser. Whether you're a developer aiming to integrate URL shortening into your application or simply exploring its functionality, the playground offers a hands-on experience to send real API requests and view responses instantly.
By default, the demo environment allows access to the azr-demo.link domain. If you're already subscribed, you can pass your API key to access additional public domains such as azr.link, aws3.link, goog.link, and an.si, or even integrate your own custom domain with our shortener service.
Experiment with various parameters and explore how the API responds to different scenarios!
"To see the result, please send a request to the API."
URL endpoint: https://api.azr.link/shorten Method: POST "header": { "Ocp-Apim-Subscription-Key": STRING, "Content-Type": "application/json" } "body": { "longUrl": STRING, "customKey": STRING, "expireHours": NUMBER, "keyLength": NUMBER, "customDomain": STRING }
Required
"longUrl": The destination URL to which you want to redirect. The protocol (e.g., http, https) must be included. The maximum supported length is 2000 characters.
Optional
"customKey": Define a custom key ("aws3.link/customKey"). If no customKey is provided, a random string will be generated as the key.
"expireHours": Define the number of hours until the shortened URL expires. Must be between 1 and 8760 (= 1 year). Default is 0, which means a non-expiring link.
"keyLength": This parameter allows you to define the length of the randomly generated key. It can be set to any value between 4 and 8. If not specified, the default length is set to 6 characters.
"customDomain": Pass the domain name you want to use for shortening your URL. Before using this, please refer to the 'Custom domain integration' section below. Public-facing domains that can be added without any additional charge include: aws3.link, goog.link, docn.link, and an.si.
Response: "body": { "shortUrl": STRING, "metadata": { "longUrl": STRING, "domain": STRING, "key": STRING, "expiration": DATE, } }
URL endpoint: https://api.azr.link/remove Method: POST "header": { "Ocp-Apim-Subscription-Key": STRING, "Content-Type": "application/json" } "body": { "key": STRING, "customDomain": STRING }
Required
"key": The key of the short URL you want to delete. For example, 'myKey' for azr.link/myKey.
Optional
"customDomain": If you are using a custom domain, specify the domain to which the provided key belongs.
Response: "body": { "message": "Provided key has been removed", "metadata": { "longUrl": STRING, "domain": STRING, "key": STRING } }
URL endpoint: https://api.azr.link/tracking Method: POST "header": { "Ocp-Apim-Subscription-Key": STRING, "Content-Type": "application/json" } "body": { "key": STRING, "customDomain": STRING }
Required
"key": The key of the short URL you want to track, such as 'myKey' for azr.link/myKey.
Optional
"customDomain": If you are using a custom domain, specify the domain to which the provided key belongs.
Response: "body": { "totalHits": NUMBER, "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 }], "metadata": { "longUrl": STRING, "domain": STRING, "key": STRING } }
"totalHits": Number of successfully registered clicks.
"hits: List of actual clicks, including the date and time the URL was clicked, IP address, referring URL, and detailed information about the user's device.
"metadata": Long URL, (custom) domain, and key of the request.
URL endpoint: https://api.azr.link/usage Method: POST "header": { "Ocp-Apim-Subscription-Key": STRING, "Content-Type": "application/json" }
Required
You must include the API key in the Ocp-Apim-Subscription-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.
Enhance your URL shortening experience by utilizing your own domain, offering a personalized and branded approach. To ensure a seamless integration, please follow these steps:
Subscription Requirement: Make sure you are enrolled in a subscription that includes custom domain integration.
DNS Configuration: After your subscription is confirmed, we will contact you via email with the necessary DNS records. It is crucial to add these records to your domain's DNS settings. This step is essential for linking your domain with our URL shortener and for validating an SSL certificate to secure HTTPS traffic.
API Endpoint Usage: Once your domain is configured, you can make API calls to our /shorten, /remove, and /track endpoints using the customDomain parameter. This allows for seamless operations with your own domain.
Important Note: The responsibility for purchasing and maintaining the domain lies solely with the customer. Ensure your domain is active and properly configured to avoid any disruptions to the service.
By adhering to these steps, you can elevate your URL shortening service with a custom domain, creating a more branded and professional presence for your short links. If you encounter any issues or have questions during the setup process, our support team is ready to assist you.
"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.
Batch Import of Shortened URLs
If you are currently using another URL shortening service and wish to import your existing shortened URLs to our platform, we offer support for batch imports. Please contact us at support@silverlining.cloud, and one of our engineers will assist you throughout the process.
Setting Up CNAME or A Record for the Apex of a Domain
When integrating your base domain (e.g., example.com) with our service, you may need to set a CNAME or A record to redirect to a URL at the apex of the domain. This step is not necessary if you only intend to integrate a subdomain (e.g., link.example.com) with our service.
Most domain registries (such as GoDaddy) do not allow setting a URL as the destination for the apex of a domain. However, there are workarounds to address this issue. We recommend using AWS Route 53, a DNS hosting service that allows you to configure the records as required by our setup. It offers a way to keep your domain registered with your current registry while managing the DNS through AWS. For guidance on integrating AWS Route 53 with your domain, please refer to this blog post: https://jryancanty.medium.com/domain-by-godaddy-dns-by-route53-fc7acf2f5580.
Alternatively, you can set up a redirection to our backend for the "www" subdomain and then redirect from the apex domain to the "www" subdomain. This approach can be implemented using a service like http://wwwizer.com.
Receiving 503 "The service is unavailable."
You may occasionally encounter the error message: "503 - The service is unavailable." This issue is temporary and typically resolves on its own. It is a problem originating from Microsoft Azure APIM platform and not from our service. Unfortunately, there is nothing we can do on our end to prevent it. We apologize for any inconvenience this may cause.