diff --git a/examples/chatbot/index.ts b/examples/chatbot/index.ts index b8e9040..645ac13 100644 --- a/examples/chatbot/index.ts +++ b/examples/chatbot/index.ts @@ -100,10 +100,12 @@ const server = app.listen(PORT, async () => { const credentialDefinition = (await apiClient.credentialTypes.import(phoneCredDefData)) phoneNumberCredentialDefinitionId = phoneNumberCredentialType?.id ?? credentialDefinition.id - phoneNumberRevocationDefinitionId = - phoneNumberCredentialType?.revocationId ? phoneNumberCredentialType?.revocationId?.[0] : credentialDefinition.revocationId?.[0] logger.info(`phoneNumberCredentialDefinitionId: ${phoneNumberCredentialDefinitionId}`) - logger.info(`phoneNumberRevocationDefinitionId: ${credentialDefinition.revocationId}`) + phoneNumberRevocationDefinitionId = + phoneNumberCredentialType?.revocationIds ? + phoneNumberCredentialType?.revocationIds?.[0] : + await apiClient.credentialTypes.createRevocation(phoneNumberCredentialDefinitionId) + logger.info(`phoneNumberRevocationDefinitionId: ${phoneNumberRevocationDefinitionId}`) } catch (error) { logger.error(`Could not create or retrieve phone number credential type: ${error}`) }