-
Notifications
You must be signed in to change notification settings - Fork 0
Reunião 21 02 2025
cbbathagliniSerpro edited this page Feb 23, 2025
·
3 revisions
Acesse o portal pelo seguinte link: 🌍 Portal CPQD Empresas

Navegue até a seção Minha Carteira para obter a Wallet Name e a Secret.

Use o seguinte comando para gerar um token de acesso:
curl --location 'https://staging-id.cpqd.com.br/api/service-authenticator/v1/token' \
--header 'Content-Type: application/json' \
--data '{
"wallet_name": "{{wallet_name}}",
"password": "{{secret}}"
}'curl --location 'https://staging-id.cpqd.com.br/api/hub-issuer/agent/v2/out-of-band/create-invitation' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data '{
"alias": "issue-credential",
"metadata": {},
"handshake_protocols": [
"https://didcomm.org/connections/1.0"
]
}'Acesse Definições de Credencial:

e clique em Nova:

Após a criação, obtenha o Credential Definition.
Usando o cred_def_id obtido no passo anterior, envie a seguinte requisição:
curl --location 'https://staging-id.cpqd.com.br/api/hub-issuer/agent/v2/issue-credential/send-offer' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data-raw '{
"connection_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cred_def_id": "MoKavRm3zoZBFHMvndmt51:3:CL:5275:default",
"credential_preview": {
"attributes": [
{
"name": "nome",
"value": "Teste"
},
{
"name": "email",
"value": "[email protected]"
}
],
"@type": "issue-credential/1.0/credential-preview"
},
"auto_issue": true,
"auto_remove": true,
"comment": "eu",
"trace": true
}'Para verificar o status da oferta de credencial, utilize:
curl --location 'https://staging-id.cpqd.com.br/api/hub-issuer/agent/v2/issue-credential-2.0/records?thread_id=8e4bc84a-07d8-472a-a67f-2c61bc929b48' \
--header 'x-api-key: VYjqmfICaBeVZKZvrUih6mJYqz89XVoz' \
--header 'Authorization: Bearer {{token}}'