LearnCard Developer Docs
  • ๐Ÿš€Get Started
    • ๐Ÿ‘‹Welcome
    • โญWho are you?
      • Learners & Employees
      • Traditional Educator
      • Non-Traditional Educator
      • Assessment Provider
      • Employer
      • App Developer & EdTech
      • DAO & Communities
      • Content Creators
      • Research Institutions
      • NGOs & Governments
      • Plugfest Partner
        • Guide for Interop Issuers
          • ๐ŸคฝCreating an Interop Issuer
        • Guide for Interop Wallets
    • Protocol Overview
      • The Internet of Education
      • The Learning Economy
      • Learner & Employee Privacy
      • 22nd Century Education
      • The Open Credential Network
      • PVCs
  • ๐Ÿ”ฐLearnCard SDK
    • What is LearnCard?
      • Why a Universal Wallet?
      • Architectural Patterns
      • Production Deployment Guide
      • Troubleshooting Guide
    • LearnCard Core
      • Quick Start
        • Create New Credentials
          • Creating Verifiable Credentials for LearnCard
          • Achievement Types and Categories
          • Custom Types
          • Understanding Boosts
          • Creating Boost Credentials
        • Sign & Send Credentials
        • Accept & Verify Credentials
        • Share & Present Credentials
      • Construction
        • Managing Seed Phrases
        • initLearnCard
        • DIDKit
        • learnCardFromSeed
        • emptyLearnCard
        • IDX Config
      • Control Planes
        • ID
        • Read
        • Store
        • Index
        • Cache
        • Context
      • Plugins
        • Adding Plugins
        • Official Plugins
          • Dynamic Loader
          • Crypto
          • DIDKit
          • DID Key
          • VC
            • Expiration Sub-Plugin
          • VC Resolution
          • VC-Templates
          • VC-API
          • Ceramic
          • IDX
          • VPQR
          • Ethereum
          • CHAPI
          • LearnCard Network
          • LearnCloud
          • LearnCard
          • Claimable Boosts
        • Writing Plugins
          • The Simplest Plugin
          • The Plugin Type
          • The LearnCard Type
          • Implementing Control Planes
          • Implementing Methods
          • The Implicit LearnCard
          • Depending on Plugins
          • Private Fields
          • Publishing a Plugin to NPM
      • URIs
      • CHAPI
        • โญCHAPI Wallet Setup Guide
        • โ†”๏ธTranslating to CHAPI documentation
        • ๐Ÿ–ฅ๏ธDemo Application
        • ๐Ÿ”ฐUsing LearnCard to Interact with a CHAPI Wallet
        • ๐Ÿ“Cheat Sheets
          • Issuers
          • Wallets
      • LearnCard UX
        • Quick Start
        • Components
          • Verifiable Credentials
            • VC Thumbnail
            • VC Thumbnail, Mini
          • LearnCards
            • LearnCard Front
            • LearnCard Back
        • API
      • LearnCard Bridge
      • API
      • Migration Guide
    • LearnCard Network
      • LearnCard Network API
        • Authentication
        • Auth Grants and API Tokens
        • Profile
        • Credentials
        • Boosts
        • Presentations
        • Storage
        • Signing Authorities
        • Notifications
        • API Docs
        • Launch Your Own Network
      • ๐Ÿ”ŒConnect Your Application
    • ConsentFlow
      • Setting Up ConsentFlow with an Independent Network
    • GameFlow
      • Sending xAPI Statements
        • xAPI URIs
      • Reading xAPI Statements
        • Advanced xAPI Statement Queries
      • Consentful "Claim Later" Flow
  • ๐Ÿš€Applications
    • LearnCard
    • SuperSkills!
      • SuperSkills! SDK
        • Digital Wallets
        • Issuing into SuperSkills!
        • ๐ŸฆธCreating a SuperSkills! Issuer
    • Metaversity
    • Admin Dashboard
  • ๐Ÿ”—Resources
    • Github
    • Community
    • ๐Ÿ’…Custom Development
    • Contact Our Team
    • Learning Economy
  • ๐Ÿค–LearnCard Services
    • LearnCard CLI
    • Discord Bot
    • Metamask Snap
  • ๐Ÿ’ธLearnBank SDK
    • Why LearnBank?
  • ๐Ÿ“ŠLearnGraph SDK
    • Why LearnGraph?
Powered by GitBook
On this page

Was this helpful?

  1. LearnCard SDK
  2. LearnCard Network
  3. LearnCard Network API

Presentations

Presentations Management

PreviousBoostsNextStorage

Last updated 2 years ago

Was this helpful?

1. Send a Presentation

To send a presentation to another profile, use the sendPresentation method. This method accepts a profileId, a vp object, and an optional encrypt parameter.

const profileId = 'janesmith';
const vp = your_presentation;
const encrypt = true;

await learnCard.invoke.sendPresentation(profileId, vp, encrypt);

2. Accept a Presentation

To accept a presentation, use the acceptPresentation method. This method accepts a uri parameter.

const uri = 'your_presentation_uri';

await learnCard.invoke.acceptPresentation(uri);

3. Get Received Presentations

To retrieve all received presentations, use the getReceivedPresentations method. This method accepts an optional from parameter.

const from = 'johnsmith';

await learnCard.invoke.getReceivedPresentations(from);

4. Get Sent Presentations

To retrieve all sent presentations, use the getSentPresentations method. This method accepts an optional to parameter.

const to = 'janesmith';

await learnCard.invoke.getSentPresentations(to);

5. Get Incoming Presentations

To retrieve all incoming presentations, use the getIncomingPresentations method. This method accepts an optional from parameter.

const from = 'johnsmith';

await learnCard.invoke.getIncomingPresentations(from);

6. Delete a Presentation

To delete a presentation, use the deletePresentation method. This method accepts a uri parameter.

const uri = 'your_presentation_uri';

await learnCard.invoke.deletePresentation(uri);
๐Ÿ”ฐ

Get received presentations

get

This endpoint returns the current user's received presentations

Authorizations
Query parameters
limitinteger ยท max: 100OptionalDefault: 25
fromstringOptional
Responses
200
Successful response
application/json
default
Error response
application/json
get
GET /api/presentation/received HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "uri": "text",
    "to": "text",
    "from": "text",
    "sent": "2025-05-15T06:57:45.620Z",
    "received": "2025-05-15T06:57:45.620Z"
  }
]

Get sent presentations

get

This endpoint returns the current user's sent presentations

Authorizations
Query parameters
limitinteger ยท max: 100OptionalDefault: 25
tostringOptional
Responses
200
Successful response
application/json
default
Error response
application/json
get
GET /api/presentation/sent HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "uri": "text",
    "to": "text",
    "from": "text",
    "sent": "2025-05-15T06:57:45.620Z",
    "received": "2025-05-15T06:57:45.620Z"
  }
]

Get incoming presentations

get

This endpoint returns the current user's incoming presentations

Authorizations
Query parameters
limitinteger ยท max: 100OptionalDefault: 25
fromstringOptional
Responses
200
Successful response
application/json
default
Error response
application/json
get
GET /api/presentation/incoming HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "uri": "text",
    "to": "text",
    "from": "text",
    "sent": "2025-05-15T06:57:45.620Z",
    "received": "2025-05-15T06:57:45.620Z"
  }
]
  • 1. Send a Presentation
  • POSTSend a Presentation
  • 2. Accept a Presentation
  • 3. Get Received Presentations
  • GETGet received presentations
  • 4. Get Sent Presentations
  • GETGet sent presentations
  • 5. Get Incoming Presentations
  • GETGet incoming presentations
  • 6. Delete a Presentation

Send a Presentation

post

This endpoint sends a presentation to a user based on their profileId

Authorizations
Path parameters
profileIdstringRequired
Body
presentationany ofRequired
or
Responses
200
Successful response
application/json
Responsestring
default
Error response
application/json
post
POST /api/presentation/send/{profileId} HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1294

{
  "presentation": {
    "@context": [
      "text"
    ],
    "id": "text",
    "type": "text",
    "verifiableCredential": {
      "@context": [
        "text"
      ],
      "id": "text",
      "type": [
        "text"
      ],
      "issuer": "text",
      "credentialSubject": {
        "id": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "refreshService": {
        "id": "text",
        "type": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "credentialSchema": {
        "id": "text",
        "type": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "issuanceDate": "text",
      "expirationDate": "text",
      "credentialStatus": {
        "type": "text",
        "id": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "name": "text",
      "description": "text",
      "validFrom": "text",
      "validUntil": "text",
      "status": {
        "type": "text",
        "id": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "termsOfUse": {
        "type": "text",
        "id": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "evidence": {
        "type": "text",
        "id": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "proof": {
        "type": "text",
        "created": "text",
        "challenge": "text",
        "domain": "text",
        "nonce": "text",
        "proofPurpose": "text",
        "verificationMethod": "text",
        "jws": "text",
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "holder": "text",
    "proof": {
      "type": "text",
      "created": "text",
      "challenge": "text",
      "domain": "text",
      "nonce": "text",
      "proofPurpose": "text",
      "verificationMethod": "text",
      "jws": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
text