Creates a multi-factor authentication (MFA) device.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateVirtualMFADevice |
The operation that you want to perform. Set the value to CreateVirtualMFADevice. |
VirtualMFADeviceName | String | Yes | device001 |
The name of the MFA device. The name must be 1 to 64 characters in length and can contain letters, digits, periods (.), and hyphens (-). |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE73368 |
The ID of the request. |
VirtualMFADevice | Struct |
The information of the MFA device. |
|
Base32StringSeed | String | DSF98HAD982KJA9SDFNAS9D8FU839B8ADHBGS**** |
The key of the MFA device. |
QRCodePNG | String | YXNkZmFzZDlmeW5hc2Q5OGZoODd4bXJmcThhaGU5aSBmYXNkZiBzYWRmIGFGIDRxd2VjIGEgdHEz**** |
The Base64-encoded QR code, in the PNG format. |
SerialNumber | String | acs:ram::123456789012****:mfa/device001 |
The serial number of the MFA device. |
Examples
Sample requests
https://ram.aliyuncs.com/?Action=CreateVirtualMFADevice
&VirtualMFADeviceName=device001
&<Common request parameters>
Sample success responses
XML
format
<CreateVirtualMFADeviceResponse>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
<VirtualMFADevice>
<SerialNumber>acs:ram::123456789012****:mfa/device001</SerialNumber>
<Base32StringSeed>DSF98HAD982KJA9SDFNAS9D8FU839B8ADHBGS****</Base32StringSeed>
<QRCodePNG>YXNkZmFzZDlmeW5hc2Q5OGZoODd4bXJmcThhaGU5aSBmYXNkZiBzYWRmIGFGIDRxd2VjIGEgdHEz****</QRCodePNG>
</VirtualMFADevice>
</CreateVirtualMFADeviceResponse>
JSON
format
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"VirtualMFADevice": {
"SerialNumber": "acs:ram::123456789012****:mfa/device001",
"Base32StringSeed": "DSF98HAD982KJA9SDFNAS9D8FU839B8ADHBGS****",
"QRCodePNG": "YXNkZmFzZDlmeW5hc2Q5OGZoODd4bXJmcThhaGU5aSBmYXNkZiBzYWRmIGFGIDRxd2VjIGEgdHEz****"
}
}
Error codes
For a list of error codes, visit the API Error Center.