How to assign credentials to participants
Now that we have Participants and Credential types in our Ecosystem, the next step is to assign a credential type to a participant. This enables:
- Participants who are issuers to issue these credential types.
- Participants who are verifiers to request these credential types for verification.
Assign a credential type to an issuer
Request
Make a request of the following structure to assign a credential type to an issuer:
HTTP
POST /v1/ecosystems/{ecosystemId}/participants/{participantId}/issuer/credentials
ecosystemId
: Credential types are assigned within a specific ecosystem. Use the ecosystem uniqueid
obtained when you created the ecosystem.participantId
: The identifier of the issuer you wish to assign the credential type to. Use the uniqueid
obtained when you created the participant.
Request body
JSON
{
"credentialId": "599bf148-d711-405a-a20b-9c8a87ac8850"
}
credentialId
: A credential type identifier. The issuer will be able to issue credential of this type that are valid in the ecosystem. Use the uniqueid
obtained when you configured the credential type.
Response
JSON
{
"id": "599bf148-d711-405a-a20b-9c8a87ac8850",
"ecosystemId": "87880d7e-a4d0-462e-8383-3f1e5e16865d",
"profile": "compact",
"type": "DriverLicense",
"name": "Driver's License"
}
The participant will now be able to issue this credential type.
Assign a credential type to a verifier
Request
Make a request of the following structure to assign a credential type to a verifier:
HTTP
POST /v1/ecosystems/{ecosystemId}/participants/{participantId}/verifier/credentials
ecosystemId
: Credential types are assigned within a specific ecosystem. Use the ecosystem uniqueid
obtained when you created the ecosystem.participantId
: The identifier of the verifier you wish to assign the credential type to. Use the uniqueid
obtained when you created the participant.
Request body
JSON
{
"credentialId": "599bf148-d711-405a-a20b-9c8a87ac8850"
}
credentialId
: A credential type identifier. The verifier will be able to create verification requests for this credential type which will be valid in the ecosystem. Use the uniqueid
obtained when you configured the credential type.
Response
JSON
{
"id": "599bf148-d711-405a-a20b-9c8a87ac8850",
"ecosystemId": "87880d7e-a4d0-462e-8383-3f1e5e16865d",
"profile": "compact",
"type": "DriverLicense",
"name": "Driver's License"
}
The participant will now be able to request this credential type for verification.