Send Credentials
How-To Guide: Sending Credentials with LearnCard
Quick Start: The send Method (Recommended)
send Method (Recommended)Prerequisites
Basic Usage
// Send to an existing LearnCard user
const result = await learnCard.invoke.send({
type: 'boost',
recipient: 'recipient-profile-id', // or 'did:key:z6Mk...'
templateUri: 'urn:lc:boost:abc123',
});
console.log(result.credentialUri); // URI of the sent credential
console.log(result.uri); // URI of the boost template used// Send to someone via email (they'll get a claim link)
const result = await learnCard.invoke.send({
type: 'boost',
recipient: '[email protected]', // Auto-detected as email
templateUri: 'urn:lc:boost:abc123',
options: {
branding: {
issuerName: 'My Organization',
issuerLogoUrl: 'https://example.com/logo.png',
recipientName: 'John Doe',
},
webhookUrl: 'https://api.example.com/webhooks/claimed',
},
});
console.log(result.inbox?.claimUrl); // Claim URL (if suppressDelivery=true)
console.log(result.inbox?.issuanceId); // Issuance tracking IDHow It Works
Response
Options (for Email/Phone Recipients)
Tracking Boost Recipients
Dynamic Templates with templateData
templateDataCreating a Templated Boost
Sending with Personalized Data
Batch Issuance to Multiple Recipients
Special Characters
Alternative: Universal Inbox API
1. The Simplest Case: Fire and Forget
2. Customizing the User Experience
3. Taking Control of Delivery and Status
Recipe 3a: Suppressing Delivery
Recipe 3b: Tracking Status with Webhooks
4. Advanced: Building an Ongoing Relationship
Last updated
Was this helpful?