Attaches a multi-factor authentication (MFA) device to a RAM user.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes BindMFADevice

The operation that you want to perform. Set the value to BindMFADevice.

UserName String Yes zhangq****

The name of the RAM user.

SerialNumber String Yes acs:ram::123456789012****:mfa/device002

The serial number of the MFA device.

AuthenticationCode1 String Yes 11****

The first authentication code.

AuthenticationCode2 String Yes 33****

The second authentication code.

Response parameters

Parameter Type Example Description
RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

Examples

Sample requests

https://ram.aliyuncs.com/?Action=BindMFADevice
&SerialNumber=acs:ram::123456789012****:mfa/device002
&UserName=zhangq****
&AuthenticationCode1=11****
&AuthenticationCode2=33****
&<Common request parameters>

Sample success responses

XML format

<RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>

JSON format

{
	"RequestId":"04F0F334-1335-436C-A1D7-6C044FE73368"
}

Error codes

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