调用BindSecureMobilePhone为资源账号类型的成员设置安全手机号码。

使用说明

本API仅用于首次设置资源账号安全手机号码,不能用于修改已有的安全手机号码。

为确保系统可以记录到管理操作的具体操作者,请使用管理账号下具有资源目录管理权限(AliyunResourceDirectoryFullAccess)的RAM用户或RAM角色调用本API。

本文将提供一个示例,为成员138660628348****设置安全手机号码。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String BindSecureMobilePhone

要执行的操作。取值:BindSecureMobilePhone

VerificationCode String 123456

验证码。

您可以调用SendVerificationCodeForBindSecureMobilePhone获取验证码。

SecureMobilePhone String xx-13900001234

安全手机号码。

该手机号码必须与SendVerificationCodeForBindSecureMobilePhone中获取验证码时设置的手机号码一致。

格式:<国家码>-<手机号码>。

说明 仅支持填写86-<手机号码>的中国内地手机号码。
AccountId String 138660628348****

成员ID。

关于公共请求参数的详情,请参见公共参数

返回数据

名称 类型 示例值 描述
RequestId String 0217AFEB-5318-56D4-B167-1933D83EDF3F

请求ID。

示例

请求示例

http(s)://[Endpoint]/?Action=BindSecureMobilePhone
&VerificationCode=123456
&SecureMobilePhone=xx-13900001234
&AccountId=138660628348****
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<BindSecureMobilePhoneResponse>
    <RequestId>0217AFEB-5318-56D4-B167-1933D83EDF3F</RequestId>
</BindSecureMobilePhoneResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "0217AFEB-5318-56D4-B167-1933D83EDF3F"
}

错误码

HttpCode 错误码 错误信息 描述
400 NotSupport.Site.Action Site does not allow current action. 该操作不支持当前站点。
409 Invalid.EnterpriseName You must specify the enterprise name. 账号未设置企业名称,请您先完成企业名称设置。
409 EnterpriseRealNameVerificationError The specified account does not pass enterprise real-name verification. We recommend you first complete enterprise real-name verification for the account. 当前账号未经过企业实名认证。请您先完成企业实名认证。
409 EntityAlreadyExists.ResourceDirectory The resource directory for the account is already enabled. We recommend that you do not enable the resource directory again. 账号已开通资源目录,请勿重复开通。
409 Invalid.VerificationCode The verification code is invalid. 验证码无效。
409 AccountTypeMismatch The type or status of the member account cannot satisfy the current operation. 账号类型或状态无法满足当前操作。
409 AccountSecureMobileAlreadyExists The secure mobile number of the member already exists. 成员的安全手机号已经存在。
409 CallerIdentityError Please use the RAM user or role of the Management Account. 请使用管理账号的RAM用户或角色进行操作。

访问错误中心查看更多错误码。