Posty5.QRCode
2.0.0
dotnet add package Posty5.QRCode --version 2.0.0
NuGet\Install-Package Posty5.QRCode -Version 2.0.0
<PackageReference Include="Posty5.QRCode" Version="2.0.0" />
<PackageVersion Include="Posty5.QRCode" Version="2.0.0" />
<PackageReference Include="Posty5.QRCode" />
paket add Posty5.QRCode --version 2.0.0
#r "nuget: Posty5.QRCode, 2.0.0"
#:package Posty5.QRCode@2.0.0
#addin nuget:?package=Posty5.QRCode&version=2.0.0
#tool nuget:?package=Posty5.QRCode&version=2.0.0
Posty5.QRCode
Generate and manage customizable QR codes for multiple use cases with the .NET SDK. This package provides a complete C# client for creating professional QR codes with template support, analytics tracking, and dynamic content management.
π What is Posty5?
Posty5 is a comprehensive suite of free online tools designed to enhance your digital marketing and social media presence. With over 4+ powerful tools and counting, Posty5 provides everything you need to:
- π Shorten URLs - Create memorable, trackable short links
- π± Generate QR Codes - Transform URLs, WiFi credentials, contact cards, and more into scannable codes
- π Host HTML Pages - Deploy static HTML pages with dynamic variables and form submission handling
- π’ Automate Social Media - Schedule and manage social media posts across multiple platforms
- π Track Performance - Monitor and analyze your digital marketing efforts
Posty5 empowers businesses, marketers, and developers to streamline their online workflowsβall from a unified control panel.
Learn more: https://posty5.com
π¦ About This Package
Posty5.QRCode is a specialized tool package for generating and managing QR codes on the Posty5 platform. It enables developers to build QR code solutions for marketing campaigns, contactless interactions, WiFi sharing, and more.
Key Capabilities
- π± 7 QR Code Types - URL, Free Text, Email, WiFi, SMS, Phone Call, and Geolocation
- π¨ Template Support - Apply professional templates for branded QR codes
- π Dynamic QR Codes - Update QR code content without changing the code itself
- π Analytics Tracking - Monitor scans, visitor counts, and last visitor dates
- π·οΈ Tag & Reference Support - Organize QR codes with custom tags and reference IDs
- π― Landing Pages - Each QR code gets a custom landing page URL
- π Short Links - Automatic short URL generation for easy sharing
- π Advanced Filtering - Search and filter by name, status, tag, or reference ID
- π CRUD Operations - Complete create, read, update, delete operations
- π API Key Filtering - Scope resources by API key for multi-tenant applications
- π Pagination Support - Efficiently handle large QR code collections
Role in the Posty5 Ecosystem
This package works seamlessly with other Posty5 SDK packages:
- Generate QR codes that link to
Posty5.ShortLinkshortened URLs - Create QR codes pointing to
Posty5.HtmlHostinghosted pages - Build comprehensive marketing campaigns with tracking and analytics
π₯ Installation
Install via NuGet Package Manager:
dotnet add package Posty5.QRCode
Or via Package Manager Console:
Install-Package Posty5.QRCode
π Quick Start
Here's a minimal example to get you started:
using Posty5.Core.Configuration;
using Posty5.Core.Http;
using Posty5.QRCode;
using Posty5.QRCode.Models;
// Initialize the HTTP client with your API key
var options = new Posty5Options
{
ApiKey = "your-api-key" // Get from https://studio.posty5.com/account/settings?tab=APIKeys
};
var httpClient = new Posty5HttpClient(options);
// Create the QR Code client
var qrCodes = new QRCodeClient(httpClient);
// Create a URL QR code
var qrCode = await qrCodes.CreateURLAsync(new CreateURLQRCodeRequest
{
Name = "Website QR Code",
TemplateId = "template-123", // Optional: Use a template for branding
Url = new QRCodeUrlTarget
{
Url = "https://posty5.com"
},
Tag = "marketing", // Optional: For organization
RefId = "CAMPAIGN-001" // Optional: External reference
});
Console.WriteLine($"QR Code Landing Page: {qrCode.QrCodeLandingPageURL}");
Console.WriteLine($"Short Link: {qrCode.ShorterLink}");
Console.WriteLine($"QR Code ID: {qrCode.Id}");
// List all QR codes
var allQRCodes = await qrCodes.ListAsync(
null,
new PaginationParams { PageNumber = 1, PageSize = 20 }
);
Console.WriteLine($"Total QR codes: {allQRCodes.Pagination.TotalCount}");
foreach (var qr in allQRCodes.Data)
{
Console.WriteLine($"{qr.Name}: {qr.NumberOfVisitors} scans");
}
π API Reference & Examples
Creating QR Codes
The SDK supports 7 different QR code types. Each type has its own creation method with type-specific parameters.
CreateURLAsync
Create a URL QR code that redirects users to a website when scanned.
Parameters:
data(CreateURLQRCodeRequest): QR code dataName(string, required): Human-readable nameTemplateId(string, required): Template ID for stylingUrl(QRCodeUrlTarget, required):Url(string): Target website URL
Tag(string?): Custom tagRefId(string?): External reference ID
Returns: Task<QRCodeModel> - Created QR code details
Example:
var qrCode = await qrCodes.CreateURLAsync(new CreateURLQRCodeRequest
{
Name = "Company Website",
TemplateId = "template-123",
Url = new QRCodeUrlTarget { Url = "https://example.com" }
});
Console.WriteLine($"Scan this: {qrCode.QrCodeLandingPageURL}");
CreateFreeTextAsync
Create a free text QR code with any custom text content.
Parameters:
data(CreateFreeTextQRCodeRequest): QR code dataName,TemplateId...Text(string, required): Custom text to encode
Returns: Task<QRCodeModel>
Example:
var textQR = await qrCodes.CreateFreeTextAsync(new CreateFreeTextQRCodeRequest
{
Name = "Product Serial #12345",
TemplateId = "template-123",
Text = "SN:12345-ABCDE-67890",
Tag = "inventory"
});
CreateEmailAsync
Create an email QR code that opens the default email client.
Parameters:
data(CreateEmailQRCodeRequest): QR code dataEmail(QRCodeEmailTarget):Email(string): Recipient emailSubject(string): Subject lineBody(string): Email body
Returns: Task<QRCodeModel>
Example:
var supportQR = await qrCodes.CreateEmailAsync(new CreateEmailQRCodeRequest
{
Name = "Contact Support",
TemplateId = "template-123",
Email = new QRCodeEmailTarget
{
Email = "support@example.com",
Subject = "Support Request",
Body = "I need help with..."
}
});
CreateWifiAsync
Create a WiFi QR code for network connection.
Parameters:
data(CreateWifiQRCodeRequest): QR code dataWifi(QRCodeWifiTarget):Name(string): SSIDAuthenticationType(string): 'WPA', 'WEP', or 'nopass'Password(string): Network password
Returns: Task<QRCodeModel>
Example:
var wifiQR = await qrCodes.CreateWifiAsync(new CreateWifiQRCodeRequest
{
Name = "Office WiFi",
TemplateId = "template-123",
Wifi = new QRCodeWifiTarget
{
Name = "OfficeNetwork-5G",
AuthenticationType = "WPA",
Password = "SecurePassword123!"
}
});
CreateCallAsync
Create a phone call QR code.
Parameters:
data(CreateCallQRCodeRequest): QR code dataCall(QRCodeCallTarget):PhoneNumber(string): Phone number to call
Returns: Task<QRCodeModel>
Example:
var hotlineQR = await qrCodes.CreateCallAsync(new CreateCallQRCodeRequest
{
Name = "Customer Service",
TemplateId = "template-123",
Call = new QRCodeCallTarget
{
PhoneNumber = "+1-800-123-4567"
}
});
CreateSMSAsync
Create an SMS QR code.
Parameters:
data(CreateSMSQRCodeRequest): QR code dataSms(QRCodeSmsTarget):PhoneNumber(string): Recipient numberMessage(string): Message text
Returns: Task<QRCodeModel>
Example:
var smsQR = await qrCodes.CreateSMSAsync(new CreateSMSQRCodeRequest
{
Name = "Join Contest",
TemplateId = "template-123",
Sms = new QRCodeSmsTarget
{
PhoneNumber = "+1-555-CONTEST",
Message = "ENTER 2026"
}
});
CreateGeolocationAsync
Create a map location QR code.
Parameters:
data(CreateGeolocationQRCodeRequest): QR code dataGeolocation(QRCodeGeolocationTarget):Latitude(string/double): LatitudeLongitude(string/double): Longitude
Returns: Task<QRCodeModel>
Example:
var mapQR = await qrCodes.CreateGeolocationAsync(new CreateGeolocationQRCodeRequest
{
Name = "Office Location",
TemplateId = "template-123",
Geolocation = new QRCodeGeolocationTarget
{
Latitude = "40.7128",
Longitude = "-74.0060"
}
});
Retrieving QR Codes
GetAsync
Retrieve complete details of a specific QR code by ID.
Example:
var qrCode = await qrCodes.GetAsync("qr-code-id-123");
Console.WriteLine($"Scans: {qrCode.NumberOfVisitors}");
ListAsync
Search and filter QR codes.
Parameters:
listParams(ListQRCodesParams?, optional): Filter criteriaName(string?),Status(string?),Tag(string?),RefId(string?)
pagination(PaginationParams?, optional)
Example:
var marketingQRs = await qrCodes.ListAsync(new ListQRCodesParams
{
Tag = "marketing",
Status = "approved"
});
foreach (var qr in marketingQRs.Data)
{
Console.WriteLine($"{qr.Name} - {qr.ShorterLink}");
}
Updating QR Codes
Each type has a corresponding Update method.
UpdateURLAsync(id, request)UpdateFreeTextAsync(id, request)UpdateEmailAsync(id, request)UpdateWifiAsync(id, request)UpdateCallAsync(id, request)UpdateSMSAsync(id, request)UpdateGeolocationAsync(id, request)
Example (Update URL):
await qrCodes.UpdateURLAsync("qr-code-id-123", new UpdateURLQRCodeRequest
{
Name = "Summer Sale - Extended",
TemplateId = "template-123",
Url = new QRCodeUrlTarget { Url = "https://example.com/extended" },
Tag = "summer-sale"
});
Deleting QR Codes
DeleteAsync
Example:
await qrCodes.DeleteAsync("qr-code-id-123");
π Error Handling
Methods throw exceptions from Posty5.Core.Exceptions.
try
{
await qrCodes.GetAsync("invalid-id");
}
catch (Posty5NotFoundException)
{
Console.WriteLine("QR Code not found");
}
π Resources
- Official Guides: https://guide.posty5.com
- API Reference: https://docs.posty5.com
- Source Code: https://github.com/Posty5/dotnet-sdk
π¦ Packages
This SDK ecosystem contains the following tool packages:
| Package | Description | Version | NuGet |
|---|---|---|---|
| Posty5.Core | Core HTTP client and models | 1.0.0 | π¦ NuGet |
| Posty5.ShortLink | URL shortener client | 1.0.0 | π¦ NuGet |
| Posty5.QRCode | QR code generator client | 1.0.0 | π¦ NuGet |
| Posty5.HtmlHosting | HTML hosting client | 1.0.0 | π¦ NuGet |
| Posty5.HtmlHostingVariables | Variable management | 1.0.0 | π¦ NuGet |
| Posty5.HtmlHostingFormSubmission | Form submission management | 1.0.0 | π¦ NuGet |
| Posty5.SocialPublisherWorkspace | Social workspace management | 1.0.0 | π¦ NuGet |
| Posty5.SocialPublisherTask | Social publishing task client | 1.0.0 | π¦ NuGet |
π License
MIT License - see LICENSE file for details.
Made with β€οΈ by the Posty5 team
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Posty5.Core (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.