Attaches a Multi-Factor Authentication (MFA) device to a RAM user.

Debug

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

Request parameters

Parameter Type Required? Example value Description
Action String Yes BindMFADevice

The name of this action.

Value: BindMFADevice

SerialNumber String Yes acs:ram::123456789012****:mfa/device002 The ID of the MFA device.
UserName String Yes Alice The username of the RAM user to which the MFA device is attached.
AuthenticationCode1 String Yes 11**** The first authentication code.
AuthenticationCode2 String Yes 33**** The second authentication code.

Response parameters

Parameter Type Example value Description
RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368 The request ID.

Example

Request example

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

Response example

XML format

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

JSON format

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

Errors

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