Welcome
Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Issuing the credential
AI Tools
Summarize Page
Copy Markdown
Open in ChatGPT
Open in Claude
Connect to Cursor
Connect to VS Code
To issue a credential use the dynamic QR code functionality and the third party attribute extension:
Javascript
Java
PHP
Python
C#
Go
Ruby
x
const expiryDate = new Date();expiryDate.setDate(expiryDate.getDate() + 1);const thirdPartyAttributeExtension = new ThirdPartyAttributeExtensionBuilder() .withDefinition('com.example.someAttribute') .withExpiryDate(expiryDate) .build();const dynamicPolicy = (new DynamicPolicyBuilder()) .withWantedRememberMe(true) .build();const dynamicScenario = (new DynamicScenarioBuilder()) .withCallbackEndpoint('/issue-attribute') .withPolicy(dynamicPolicy) .withExtension(thirdPartyAttributeExtension) .build();const shareUrlResult = await yotiClient.createShareUrl(dynamicScenario);| Parameter | Description |
|---|---|
| withDefinition() | This value will be your credential name “com.example.someAttribute” |
| withExpiryDate() | The expired date indicates by when the credential should be issued by. If the credential is not issued by that time, the issuance request will be automatically cancelled. It conforms to RFC3339 (e.g.: 2006-01-02T22:04:05.123Z) |
| Dynamic policy | This is where you define all your Attributes explained you wish to retrieve from the user. You may set source constraints to ensure only an individual can only share data from a particular document. The soft preference set to 'false' will ensure this is enforced. Please head over to the Create button dynamic QR code section for more details on this. |
| Dynamic scenario | Build the scenario with the third-party extension request and share policy request. |
Get credential issuance details
The credential issuance details will include an issuance token.
Note..
This should be stored as part of the customer record as this will be required for issuing the credential and revoking / updating the credential in the future.
Javascript
Java
PHP
Python
C#
Go
Ruby
const activityDetails = await yotiClient.getActivityDetails(token);const attributeIssuanceDetails = activityDetails.getExtraData().getAttributeIssuanceDetails();const issuingAttributes = attributeIssuanceDetails.getIssuingAttributes();Request for credential to be issued
The credential value is now ready to be issued to the Yoti user which is the schema of the credential. You will need to provide the issuance token, the name and the payload below.
Javascript
Java
PHP
Python
C#
Go
Ruby
Javascript
const payload = new Payload({ issuance_token: attributeIssuanceDetails.getToken(), attributes: [ { name: 'com.example.someAttribute', value: 'some attribute value', }, ],});const request = new RequestBuilder() .withBaseUrl('https://api.yoti.com/api/v1/attribute-registry') .withEndpoint('/attributes') .withPemString('PEM_CONTENT') .withHeader('X-Yoti-Auth-Id', 'CLIENT_SDK_ID') .withMethod('POST') .withPayload(payload) .build();const response = await request.execute();// Note:// - Use RequestBuilder::withPemFilePath() to provide a file path// (This may have performance implications)The user will now have the credential.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Was this page helpful?
Next to read:
Request the credentialGot a question? Contact us here.
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message