Creates a virtual Multi-Factor Authentication (MFA) device.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description
Action String Yes CreateVirtualMFADevice

The name of this action.

Value: CreateVirtualMFADevice

VirtualMFADeviceName String Yes device001

The device name. It must be 1 to 64 characters in length.

Pattern: [a-zA-Z0-9-]*

Response parameters

Parameter Type Example value Description
RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368 The request ID.
VirtualMFADevice N/A N/A The virtual MFA device.
Base32StringSeed String DSF98HAD982KJA9SDFNAS9D8FU839B8ADHBGS**** The key of the virtual MFA device.
QRCodePNG String YXNkZmFzZDlmeW5hc2Q5OGZoODd4bXJmcThhaGU5aSBmYXNkZiBzYWRmIGFGIDRxd2VjIGEgdHEz**** The Base64-encoded QR code PNG.
SerialNumber String acs:ram::123456789012****:mfa/device001 The ID of the MFA device.

Example

Request example

https://ram.aliyuncs.com/?Action=CreateVirtualMFADevice
&VirtualMFADeviceName=device001
&<Common parameters>

Response example

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

{
    "VirtualMFADevice":{
        "SerialNumber":"acs:ram::123456789012****:mfa/device001",
        "QRCodePNG":"YXNkZmFzZDlmeW5hc2Q5OGZoODd4bXJmcThhaGU5aSBmYXNkZiBzYWRmIGFGIDRxd2VjIGEgdHEz****",
        "Base32StringSeed":"DSF98HAD982KJA9SDFNAS9D8FU839B8ADHBGS****"
    },
    "RequestId":"04F0F334-1335-436C-A1D7-6C044FE73368"
}

Errors

For a list of error codes, visit the API Error Center.