All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| generateMessagingCode | POST /accounts/{accountId}/code/messaging | Messaging Authentication Code |
| generateVoiceCode | POST /accounts/{accountId}/code/voice | Voice Authentication Code |
| verifyCode | POST /accounts/{accountId}/code/verify | Verify Authentication Code |
MessagingCodeResponse generateMessagingCode(codeRequest)
Send an MFA code via text message (SMS).
import {
MFAApi,
Configuration,
CodeRequest
} from 'bandwidth-sdk';
const configuration = new Configuration();
const apiInstance = new MFAApi(configuration);
let accountId: string; //Your Bandwidth Account ID. (default to undefined)
let codeRequest: CodeRequest; //MFA code request body.
const { status, data } = await apiInstance.generateMessagingCode(
accountId,
codeRequest
);| Name | Type | Description | Notes |
|---|---|---|---|
| codeRequest | CodeRequest | MFA code request body. | |
| accountId | [string] | Your Bandwidth Account ID. | defaults to undefined |
MessagingCodeResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VoiceCodeResponse generateVoiceCode(codeRequest)
Send an MFA Code via a phone call.
import {
MFAApi,
Configuration,
CodeRequest
} from 'bandwidth-sdk';
const configuration = new Configuration();
const apiInstance = new MFAApi(configuration);
let accountId: string; //Your Bandwidth Account ID. (default to undefined)
let codeRequest: CodeRequest; //MFA code request body.
const { status, data } = await apiInstance.generateVoiceCode(
accountId,
codeRequest
);| Name | Type | Description | Notes |
|---|---|---|---|
| codeRequest | CodeRequest | MFA code request body. | |
| accountId | [string] | Your Bandwidth Account ID. | defaults to undefined |
VoiceCodeResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VerifyCodeResponse verifyCode(verifyCodeRequest)
Verify a previously sent MFA code.
import {
MFAApi,
Configuration,
VerifyCodeRequest
} from 'bandwidth-sdk';
const configuration = new Configuration();
const apiInstance = new MFAApi(configuration);
let accountId: string; //Your Bandwidth Account ID. (default to undefined)
let verifyCodeRequest: VerifyCodeRequest; //MFA code verify request body.
const { status, data } = await apiInstance.verifyCode(
accountId,
verifyCodeRequest
);| Name | Type | Description | Notes |
|---|---|---|---|
| verifyCodeRequest | VerifyCodeRequest | MFA code verify request body. | |
| accountId | [string] | Your Bandwidth Account ID. | defaults to undefined |
VerifyCodeResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 429 | Too Many Requests | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]