LogoLogo
ProductsCommunityGitHubShare Feedback
Wallet Kit
Wallet Kit
  • What is the Wallet Kit?
    • Introduction
    • Transition To The Community Stack
    • Self-Sovereign Identity
      • SSI | Basics
      • Technology & Concepts
    • Wallet Kit
      • Wallet Kit | Basics
        • Overview
        • Functionality
      • Architecture
    • Issuer & Verifier Portals
      • Functionality
      • Architecture
  • Getting started
    • Quick Start
    • CLI | Command Line Interface
    • REST APIs
      • Issuer Configuration
      • Credential Templates
      • Credential Issuance
      • Credential Verification
    • Dependency (JVM)
    • Frontend
    • Public deployments
    • Demo
    • Build
      • Docker Build
        • Docker
      • Local Build
  • Configuration and Setup
    • Wallet backend setup
    • Issuer portal setup
    • Verifier portal setup
  • Concepts
    • OpenID Connect (OIDC)
      • OIDC for Credential Issuance
      • OIDC for Verifiable Presentations (SIOP)
      • Issuance via OIDC for Verifiable Presentations (SIOP)
  • Ecosystems
    • IOTA
      • Tutorials
        • Login With IOTA
  • Community
    • Discord
    • Twitter
    • Newsletter
    • GitHub Discussions
  • DEVELOPER RELATIONS
    • Roadmap
    • Contribute
    • Share Feedback
    • Contact
  • Product Editions
    • Open Source | Always Free
    • Enterprise
    • Cloud Platform
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Getting started
  2. REST APIs

Credential Issuance

PreviousCredential TemplatesNextCredential Verification

Last updated 1 year ago

Was this helpful?

Issuance is very simple, in fact, you only need to call a single HTTP POST endpoint:

Issue Credential

POST /issuer-api/{tenantId}/credentials/issuance/request

curl -X 'POST' \
  'http://0.0.0.0:8080/issuer-api/default/credentials/issuance/request?isPreAuthorized=true&walletId=$walletId' \
  -H 'accept: text/plain' \
  -H 'Content-Type: application/json' \
  -d 'SEE EXAMPLE BODY'

Wallet When issuing a credential, you will have to pre-select what type of wallet shall be used.

There are three types of wallets:

  1. Mobile wallets:

    • Cross device flow: User uses another device (desktop pc, laptop) than where their wallet is installed (smartphone).

    • In this case, you will use the virtual wallet "x-device", which creates an "openid-initiate-issuance://..." URL.

  2. Web wallets:

    • Same device flow: User uses the same device that their wallet is installed on.

    • In this case, you will have to additionally ask what web wallet the user is using (if you aren't forcing them to use your or an specific web wallet).

    • e.g. "walt.id", which creates an "..." URL.

  3. App wallets

    • Theoretically same device flow, but also uses the virtual wallet "x-device" for creating an "openid-initiate-issuance://..." URL.

In the default configuration you can use the wallet "walt.id" (), or the virtual wallet "x-device" for the cross device flow ("openid-initiate-issuance://...").

The selected walletId is the id configured in the mappings seen in wallet_kit-configuration.m

{
    "credentials": [
        {
        "credentialData": {
            "my data": "..."
        },
        "type": "string"
        }
    ]
}
{
    "credentials": [
        {
        "credentialData": {
            "credentialSubject": {
                "currentAddress":["1 Boulevard de la Liberté, 59800 Lille"],"dateOfBirth":"1993-04-08","familyName":"DOE","firstName":"Jane","gender":"FEMALE","id":"did:ebsi:2AEMAqXWKYMu1JHPAgGcga4dxu7ThgfgN95VyJBJGZbSJUtp","nameAndFamilyNameAtBirth":"Jane DOE","personalIdentifier":"0904008084H","placeOfBirth":"LILLE, FRANCE"}
        },
        "type": "VerifiableId"
        }
    ]
}

Answers with a redirect (header "Location") to the issuance URL, e.g.

https://wallet.walt.id/
https://wallet.walt.id
http://localhost:3000/api/siop/initiateIssuance/?issuer=http%3A%2F%2Flocalhost%3A8080%2Fissuer-api%2Fdefault%2Foidc%2F&credential_type=VerifiableId&pre-authorized_code=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxYTYyMzJiMy1hZDE0LTQ3YTYtYjMxNi00NzUzZjJhM2Q2NWYiLCJwcmUtYXV0aG9yaXplZCI6dHJ1ZX0.TGYpvRwE9Qc7-BSMLAA-u3Kweyf8ks2w3ulBpSyZQiI&user_pin_required=false