Issue Credentials
This guide explains how organizations can share reusable identity data with their users.
Portabl secures data sharing using DIDComm Messaging v2.0 (opens in a new tab) specification which is ratified by Decentralized Identity Foundation (DIF) (opens in a new tab).
Create a Project
Explore first steps to register a project.
Setup an Issuance Data Profile
Explore a default configuration for an issuance of reusable identity credentials to your users.
Setup Issuance Settings
Explore the steps to configure your project for the credential issuance to your users.
Generate an Access Token
In order to access the needed APIs for issuing a credential you'll need to generate an access token with the required scopes.
curl --request POST \
--url https://api.getportabl.com/api/v1/auth/token \
--header 'Content-Type: application/json' \
--data '{
"scopes": [
"create:issuance-workflows",
"send:issuance-workflows"
],
"clientId": "<CLIENT_ID>",
"clientSecret": "<CLIENT_SECRET>",
}'
Create an Issuance Workflow
Next, create an issuance workflow. This workflow will hold details about the state of issuance. When defining the workflow, specify the datapoints that meet the constraints defined in the data profile following our vocabulary.
curl --request POST \
--url https://api.getportabl.com/api/v1/issuance-workflows \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"datapoints": {
"firstName": "Jane",
"lastName": "Doe",
"birthDate": "1/1/2000",
},
"projectId": "<PROJECT_ID>",
}'
Send an Invitation
After creating the workflow, specify where you would like it to be sent. Invitations can be sent via a combination of Email, SMS, and DIDComm.
curl --request POST \
--url https://api.getportabl.com/api/v1/issuance-workflows/__ISSUANCE_WORKFLOW_ID__/send-invitation \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"destinations": [
{
"channel": "DIDCOMM",
"target": "<USER_DID>"
},
{
"channel": "Email",
"target": "<TARGET_EMAIL>"
}
{
"channel": "SMS",
"target": "<TARGET_PHONE_NUMBER>"
}
]
}'
See the results
Once the user receives and accepts they will receive a credential with datapoints that were defined in the issuance workflow creation step. Additionally, the user's respective credential data will be added to the project.
Further Reading
Ecosystem Partners
Explore feature we provide to empower creation of the trusted partner ecosystem.
Webhooks
Explore webhook events we expose pertaining to the user data verification process, risk signals, and credential issuance.
Build an EcosystemSoon
Learn how to utilize building blocks to create a trusted network of partners.
Manage IdentitiesSoon
Monitor for changes in risk and control