[**Documentation**](index.md) *** [Documentation](packages.md) / Vonage Verify v2 # Vonage Verify V2 SDK for Node.js ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vonage/vonage-node-sdk/ci.yml?branch=3.x) [![Codecov](https://img.shields.io/codecov/c/github/vonage/vonage-node-sdk?label=Codecov&logo=codecov&style=flat-square)](https://codecov.io/gh/Vonage/vonage-server-sdk) ![Latest Release](https://img.shields.io/npm/v/@vonage/verify2?label=%40vonage%2Fverify2&style=flat-square) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-square)](../../CODE_OF_CONDUCT.md) [![License](https://img.shields.io/npm/l/@vonage/accounts?label=License&style=flat-square)][license] Vonage This is the Vonage Verify (for version 2) SDK for Node.js for use with [Vonage APIs](https://www.vonage.com/). To use it you will need a Vonage account. Sign up [for free at vonage.com][signup]. For full API documentation refer to [developer.vonage.com](https://developer.vonage.com/). - [Installation](#installation) - [Usage](#usage) - [Promises](#promises) - [Testing](#testing) ## Installation We recommend using this SDK as part of the overall [`@vonage/server-sdk` package](https://github.com/vonage/vonage-node-sdk). Please see the main package for installation. You can also use this SDK standalone if you only need access to just the Verify API. ### With NPM ```bash npm install @vonage/verify2 ``` ### With Yarn ```bash yarn add @vonage/verify2 ``` ## Usage If you are using this SDK as part of the Vonage Server SDK, you can access it as the `verify2` property off of the client that you instantiate. ```js const { Vonage } = require('@vonage/server-sdk') const credentials = { apiKey: API_KEY, apiSecret: API_SECRET, } const options = {} const vonage = new Vonage(credentials, options) vonage.verify2 .newRequest() .then((resp) => console.log(resp)) .catch((err) => console.error(err)) ``` ### Standalone The SDK can be used standalone from the main [Vonage Server SDK for Node.js](https://github.com/vonage/vonage-node-sdk) if you only need to use the Verify V2 API. All you need to do is `require('@vonage/verify2')`, and use the returned object to create your own client. ```js const { Auth } = require('@vonage/auth') const { Verify2 } = require('@vonage/verify2') const credentials = new Auth({ applicationId: APP_ID, privateKey: PRIAVTE_KEY, }) const options = {} const verifyClient = new Verify2(credentials, options) ``` Where `credentials` is any option from [`@vonage/auth`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/auth/README.md#options), and `options` is any option from [`@vonage/server-client`](https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/server-client/README.md#options) ## Promises Most methods that interact with the Vonage API uses Promises. You can either resolve these yourself, or use `await` to wait for a response. ```js const resp = await verifyClient.checkCode(VERIFY_REQUEST_ID, CODE) vonage.verify2 .checkCode(VERIFY_REQUEST_ID, CODE) .then((resp) => console.log(resp)) .catch((err) => console.error(err)) ``` ## Testing Run: ```bash npm run test ``` [signup]: https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaign=node-server-sdk [license]: _media/LICENSE.txt ## Enumerations ### Channels Defined in: [verify2/lib/enums/channels.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/channels.ts#L4) Enum representing different communication channels for verification. #### Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | | `EMAIL` | `"email"` | Email channel for verification. | [verify2/lib/enums/channels.ts:28](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/channels.ts#L28) | | `SMS` | `"sms"` | SMS channel for verification. | [verify2/lib/enums/channels.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/channels.ts#L8) | | `VOICE` | `"voice"` | Voice channel for verification. | [verify2/lib/enums/channels.ts:23](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/channels.ts#L23) | | `WHATSAPP` | `"whatsapp"` | WhatsApp channel for verification. | [verify2/lib/enums/channels.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/channels.ts#L13) | | `WHATSAPP_INTERACTIVE` | `"whatsapp_interactive"` | Interactive WhatsApp channel for verification. | [verify2/lib/enums/channels.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/channels.ts#L18) | *** ### EventStatus Defined in: [verify2/lib/enums/eventStatus.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/eventStatus.ts#L4) Enum representing the status of an event in the verification process. #### Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | | `COMPLETED` | `"completed"` | The event has been completed successfully. | [verify2/lib/enums/eventStatus.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/eventStatus.ts#L8) | | `FAILED` | `"failed"` | The event has failed. | [verify2/lib/enums/eventStatus.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/eventStatus.ts#L13) | | `REJECTED` | `"rejected"` | The event has been rejected. | [verify2/lib/enums/eventStatus.ts:23](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/eventStatus.ts#L23) | | `USER_REJECTED` | `"user_rejected"` | The user has rejected the event. | [verify2/lib/enums/eventStatus.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/eventStatus.ts#L18) | *** ### RequestStatus Defined in: [verify2/lib/enums/requestStatus.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestStatus.ts#L4) Enum representing the status of a verification request. #### Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | | `COMPLETED` | `"completed"` | The verification request has been completed successfully. | [verify2/lib/enums/requestStatus.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestStatus.ts#L8) | | `EXPIRED` | `"expired"` | The verification request has expired. | [verify2/lib/enums/requestStatus.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestStatus.ts#L18) | | `FAILED` | `"failed"` | The verification request has failed. | [verify2/lib/enums/requestStatus.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestStatus.ts#L13) | *** ### RequestWorkflowStatus Defined in: [verify2/lib/enums/requestWorkflowsStatus.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestWorkflowsStatus.ts#L4) Enum representing the status of a verification request workflow step. #### Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | | `COMPLETED` | `"completed"` | The workflow step has been completed successfully. | [verify2/lib/enums/requestWorkflowsStatus.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestWorkflowsStatus.ts#L13) | | `EXPIRED` | `"expired"` | The workflow step has expired. | [verify2/lib/enums/requestWorkflowsStatus.ts:23](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestWorkflowsStatus.ts#L23) | | `FAILED` | `"failed"` | The workflow step has failed. | [verify2/lib/enums/requestWorkflowsStatus.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestWorkflowsStatus.ts#L18) | | `UNUSED` | `"unused"` | The workflow step is unused. | [verify2/lib/enums/requestWorkflowsStatus.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestWorkflowsStatus.ts#L8) | | `USER_REJECTED` | `"user_rejected"` | The user has rejected the workflow step. | [verify2/lib/enums/requestWorkflowsStatus.ts:28](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/requestWorkflowsStatus.ts#L28) | *** ### SilentAuthChannel Defined in: [verify2/lib/enums/channels.ts:34](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/channels.ts#L34) Enum representing the Silent Authentication channel. #### Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | | `SILENT_AUTH` | `"silent_auth"` | Silent Authentication channel for verification. | [verify2/lib/enums/channels.ts:38](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/channels.ts#L38) | *** ### SilentAuthStatus Defined in: [verify2/lib/enums/silentAuthStatus.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/silentAuthStatus.ts#L4) Enum representing the status of Silent Authentication. #### Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | | `ACTION_PENDING` | `"action_pending"` | An action is pending for Silent Authentication. | [verify2/lib/enums/silentAuthStatus.ts:28](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/silentAuthStatus.ts#L28) | | `COMPLETED` | `"completed"` | Silent Authentication has been completed successfully. | [verify2/lib/enums/silentAuthStatus.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/silentAuthStatus.ts#L8) | | `EXPIRED` | `"expired"` | Silent Authentication has expired. | [verify2/lib/enums/silentAuthStatus.ts:23](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/silentAuthStatus.ts#L23) | | `FAILED` | `"failed"` | Silent Authentication has failed. | [verify2/lib/enums/silentAuthStatus.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/silentAuthStatus.ts#L13) | | `USER_REJECTED` | `"user_rejected"` | The user has rejected Silent Authentication. | [verify2/lib/enums/silentAuthStatus.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/silentAuthStatus.ts#L18) | *** ### VerifyLocale Defined in: [verify2/lib/enums/verifyLocale.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L4) Enum representing different locales for verification. #### Enumeration Members | Enumeration Member | Value | Description | Defined in | | ------ | ------ | ------ | ------ | | `DE_DE` | `"de-de"` | German (Germany) locale. | [verify2/lib/enums/verifyLocale.ts:43](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L43) | | `EN_GB` | `"en-gb"` | English (United Kingdom) locale. | [verify2/lib/enums/verifyLocale.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L13) | | `EN_US` | `"en-us"` | English (United States) locale. | [verify2/lib/enums/verifyLocale.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L8) | | `ES_ES` | `"es-es"` | Spanish (Spain) locale. | [verify2/lib/enums/verifyLocale.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L18) | | `ES_MX` | `"es-mx"` | Spanish (Mexico) locale. | [verify2/lib/enums/verifyLocale.ts:23](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L23) | | `ES_US` | `"es-us"` | Spanish (United States) locale. | [verify2/lib/enums/verifyLocale.ts:28](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L28) | | `FR_FR` | `"fr-fr"` | French (France) locale. | [verify2/lib/enums/verifyLocale.ts:38](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L38) | | `HI_IN` | `"hi-in"` | Hindi (India) locale. | [verify2/lib/enums/verifyLocale.ts:53](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L53) | | `ID_ID` | `"id-id"` | Indonesian (Indonesia) locale. | [verify2/lib/enums/verifyLocale.ts:68](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L68) | | `IT_IT` | `"it-it"` | Italian (Italy) locale. | [verify2/lib/enums/verifyLocale.ts:33](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L33) | | `PT_BR` | `"pt-br"` | Portuguese (Brazil) locale. | [verify2/lib/enums/verifyLocale.ts:58](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L58) | | `PT_PT` | `"pt-pt"` | Portuguese (Portugal) locale. | [verify2/lib/enums/verifyLocale.ts:63](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L63) | | `RU_RU` | `"ru-ru"` | Russian (Russia) locale. | [verify2/lib/enums/verifyLocale.ts:48](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/enums/verifyLocale.ts#L48) | ## Classes ### Verify2 Defined in: [verify2/lib/verify2.ts:22](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/verify2.ts#L22) A class for interacting with the Vonage Verify API (Version 2). #### Extends - [`Client`](Vonage-Server-Client.md#client) #### Constructors ##### Constructor ```ts new Verify2(credentials, options?): Verify2; ``` Defined in: server-client/dist/lib/client.d.ts:35 Creates a new instance of the Client. ###### Parameters ###### credentials The authentication credentials or an authentication instance. [`AuthInterface`](Vonage-Auth.md#authinterface) | [`AuthParams`](Vonage-Auth.md#authparams) ###### options? [`ConfigParams`](Vonage-Server-Client.md#configparams) Optional configuration settings for the client. ###### Returns [`Verify2`](#verify2) ###### Inherited from [`Client`](Vonage-Server-Client.md#client).[`constructor`](Vonage-Server-Client.md#client#constructor) #### Properties ##### auth ```ts protected auth: AuthInterface; ``` Defined in: server-client/dist/lib/client.d.ts:24 The authentication instance responsible for generating authentication headers and query parameters. ###### Inherited from [`Client`](Vonage-Server-Client.md#client).[`auth`](Vonage-Server-Client.md#client#auth) ##### authType ```ts protected authType: AuthenticationType = AuthenticationType.JWT; ``` Defined in: [verify2/lib/verify2.ts:26](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/verify2.ts#L26) The authentication type used for this client (JWT). ###### Overrides [`Client`](Vonage-Server-Client.md#client).[`authType`](Vonage-Server-Client.md#client#authtype) ##### config ```ts protected config: ConfigParams; ``` Defined in: server-client/dist/lib/client.d.ts:28 Configuration settings for the client, including default hosts for various services and other request settings. ###### Inherited from [`Client`](Vonage-Server-Client.md#client).[`config`](Vonage-Server-Client.md#client#config) ##### transformers ```ts static transformers: object; ``` Defined in: server-client/dist/lib/client.d.ts:11 Static property containing utility transformers. ###### camelCaseObjectKeys ```ts camelCaseObjectKeys: PartialTransformFunction; ``` ###### kebabCaseObjectKeys ```ts kebabCaseObjectKeys: PartialTransformFunction; ``` ###### omit() ```ts omit: (keys, obj) => TransformedObject; ``` ###### Parameters ###### keys `string`[] ###### obj [`ObjectToTransform`](Vonage-Server-Client.md#objecttotransform) ###### Returns [`TransformedObject`](Vonage-Server-Client.md#transformedobject) ###### snakeCaseObjectKeys ```ts snakeCaseObjectKeys: PartialTransformFunction; ``` ###### Inherited from [`Client`](Vonage-Server-Client.md#client).[`transformers`](Vonage-Server-Client.md#client#transformers) #### Methods ##### addAuthenticationToRequest() ```ts addAuthenticationToRequest(request): Promise; ``` Defined in: server-client/dist/lib/client.d.ts:43 Adds the appropriate authentication headers or parameters to the request based on the authentication type. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](Vonage-Server-Client.md#client).[`addAuthenticationToRequest`](Vonage-Server-Client.md#client#addauthenticationtorequest) ##### addBasicAuthToRequest() ```ts protected addBasicAuthToRequest(request): Promise; ``` Defined in: server-client/dist/lib/client.d.ts:71 Adds basic authentication headers to the request. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](Vonage-Server-Client.md#client).[`addBasicAuthToRequest`](Vonage-Server-Client.md#client#addbasicauthtorequest) ##### addJWTToRequest() ```ts protected addJWTToRequest(request): Promise; ``` Defined in: server-client/dist/lib/client.d.ts:64 Adds a JWT to the request. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](Vonage-Server-Client.md#client).[`addJWTToRequest`](Vonage-Server-Client.md#client#addjwttorequest) ##### addQueryKeySecretToRequest() ```ts protected addQueryKeySecretToRequest(request): Promise; ``` Defined in: server-client/dist/lib/client.d.ts:57 Adds API key and secret to the request. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](Vonage-Server-Client.md#client).[`addQueryKeySecretToRequest`](Vonage-Server-Client.md#client#addquerykeysecrettorequest) ##### addQueryKeySecretToRequestBody() ```ts protected addQueryKeySecretToRequestBody(request): Promise; ``` Defined in: server-client/dist/lib/client.d.ts:50 Adds API key and secret to the request body. ###### Parameters ###### request [`VetchOptions`](Vonage-Vetch.md#vetchoptions) The request options to which authentication needs to be added. ###### Returns `Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\> - The request options with the added authentication. ###### Inherited from [`Client`](Vonage-Server-Client.md#client).[`addQueryKeySecretToRequestBody`](Vonage-Server-Client.md#client#addquerykeysecrettorequestbody) ##### cancel() ```ts cancel(requestId): Promise; ``` Defined in: [verify2/lib/verify2.ts:69](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/verify2.ts#L69) Cancels a verification request. ###### Parameters ###### requestId `string` The ID of the verification request to cancel. ###### Returns `Promise`\<`boolean`\> `true` if the cancellation was successful. ##### checkCode() ```ts checkCode(requestId, code): Promise; ``` Defined in: [verify2/lib/verify2.ts:53](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/verify2/lib/verify2.ts#L53) Checks a verification code against a verification request. ###### Parameters ###### requestId `string` The ID of the verification request. ###### code `string` The verification code to check. ###### Returns `Promise`\<`string`\> The status of the verification code check. ##### createTemplate() ```ts createTemplate(template): Promise