调用CreateTenantDID创建租户DID。用户在开通 DIS 服务之后,需要使用自己的账户信息为自己创建 DID。在调用 DIS 其他接口之前,首先需要创建租户 DID。

调试

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

请求参数

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

系统规定参数。取值:CreateTenantDID。

ClientToken String 01357967-61d1-42a9-8a90-f0dd8a161411

UUID,作为幂等性标识token。

RegionId String ""

阿里云网关会自动填入regionId,不需要手动填入。

返回数据

名称 类型 示例值 描述
DID String "did:mychain:xxx"

生成的did字符串

RequestId String "757DB186-A865-4F65-935D-7D990E0CE451"

阿里云网关请求id,用于日志检索请求详情。

ResultCode String "OK"

API调用结果码,成功为OK,失败的结果码参考下面的"结果码详情"表格

ResultMessage String ""

API调用结果描述,比如调用失败的时候会显示具体的错误信息

Success Boolean true

返回操作的状态码:成功为true,失败为false;

示例

请求示例

http(s)://[Endpoint]/?Action=CreateTenantDID
&ClientToken=01357967-61d1-42a9-8a90-f0dd8a161411
&<公共请求参数>

正常返回示例

JSON 格式

{"RequestId":"\"757DB186-A865-4F65-935D-7D990E0CE451\"","ResultMessage":"\"\"","ResultCode":"\"OK\"","DID":"\"did:mychain:xxx\"","Success":"true"}

错误码

HttpCode 错误码 错误信息 描述
500 AchievingError.RedisLock Failed to retrieve the synchronized lock. 获取同步锁失败
500 AsyncCreationFailure.DID Did not find the corresponding item of Mapping while creating DID. Did创建中未发现Mapping对应项目
500 AuthenticationFailure Authentication failed. 认证未通过
500 CertificationDuplicate.DID The specified DID is already bound to other user information. 该did已和其他实名信息绑定
500 CertificationNotSupport The tenant has not activated Identity Authentication. 该租户没有开通身份认证
500 ChildDIDCannotBeDerivedFromRootDID.DIDError The child DID cannot be extended from the root DID. 根DID无法派生出子DID
500 Confliction.ServiceType A conflict occurred to service type. 服务类型冲突
500 ConflictionInUpdating.DID An error occurred while updating the DID. Did更新冲突
500 CountNotEnough.MaskedIdentityVerification The number of desensitized identity verification is insufficient. 脱敏身份验证次数不足
500 CreationError.DID Failed to create a DID. Please contact the developer. did生成失败,请联系开发人员
500 CreationFailure.PreservedAccountResolverReader Failed to create the reserved account ResolverReader. 创建预留账户ResolverReader失败
500 CreationFailure.ServiceType Failed to save service type into blockchain. 服务类型上链失败
500 DecryptionError.KMS Failed to decrypt. 解密失败
500 DidNotPass.Check You did not pass the verification. 未通过审核
500 Duplicate.ServiceId The service ID is duplicated. service id重复
500 EncryptionError.KMS An encryption error occurred. 加密错误
500 Error.HttpCallingCloudShield An error occurred while calling Cloud Security Services using HTTP. http调用云盾出错
500 ErrorOccurred.HttpCallingCloudShield An error occurred while calling KMS using HTTP. http调用kms出错
500 ErrorReturned.REST A return error occurred to the BaaS Rest service. BaaS Rest服务返回错误
500 Failure.CorporateFaceVerification The legal person face verification failed. 企业法人刷脸结果为失败
500 GeneratingPublicPrivateKeyPairError.KMS Failed to create public and private key pairs. 创建公私钥对失败
500 GeneratingSignatureError.KMS Failed to compute signatures. 计算签名失败
500 InCreation.DID The DID is being created. Did正在生成中
500 InitializationError.MyChainSDK Failed to initialize MyChainSDK. MyChainSDK初始化失败
500 InProgress.CorporateFaceVerification The legal person face verification is in progress. 企业法人刷脸还在进行中
500 InternalRPCError An internal RPC error occurred. 内部RPC错误
500 InUpdating.DID The DID is still being updated. Did正在更新中
500 InvalidCorrespondingKey.DID An error occurred in the corresponding key of DID. DID对应KEY异常
500 InvalidType.DID The DID type is abnormal. DID类型异常
500 NotAuthorized.Creator The creator is not authorized. 创建者无权限
500 NotDoneYet.FaceVerification The user has not performed face verification. 用户还未刷脸
403 NotEnoughAuthorization You are not authorized to perform the operation. 权限不足
404 NotExist.DID The specified DID does not exist. Did不存在
500 NotExist.ServiceType The specified service type does not exist. service type不存在
404 NotExist.Tenant The tenant does not exist. 租户不存在
404 NotRegistered.CurrentInterfacePermission You are not authorized for this interface. 未开通该接口权限
404 NotRegistered.DIDService You have not activated the DIS service. 用户DIS服务未开通
500 ParametersInitializationError.SDK Failed to initialize SDK parameters. 初始化SDK参数错误
404 PartnerNotExist The partners have not been verified by the DIS service. 合作方还未入住
500 QueryError.DIDDoc Failed to query DID doc. 查询did doc失败
500 QueryFailure.ServiceType Failed to query service type. 服务类型查询失败
500 RequestContentError Failed to retrieve the requested content. 获取请求内容错误
500 RequestParamsError The requested parameters are incorrect. 请求参数有误
500 ReturnedResultNotOk.Plus The result returned from BaaS Plus is not OK. baas plus返回结果不为OK
500 SavingRequestError Failed to save the requested content. 保存请求内容错误
500 SendToChainError Failed to write onto the blockchain. 链上写入失败
405 SignatureFailure Failed to issue a signature. 签名失败
500 StatusNotReady.VerificableClaim The status of the verifiable claim is abnormal. 可验证声明状态不正常
500 Timeout.FaceVerification Face verification has timed out. 刷脸超时
500 TooLong.UserId The maximum length of the UID is exceeded. UID太长
500 TooManyServicesProvided The maximum number of customized services is exceeded. The maximum value is 10. 自定义服务超过上限
500 TypeError.DID The DID type is invalid. did类型错误
500 VerificationFailure.DID You have not passed DID verification. did验证未通过
500 WrongValueReturned.CloudShield The value returned from the cloud endpoint is incorrect. 云端返回值不正确
500 GwError.AccessDenied The access is denied. 访问受限
500 GwError.ApiNotFound The specified API operation or the version of the API operation does not exist. 找不到api或版本信息
500 GwError.BadResponse The provider response is invalid. 无效的返回信息
500 GwError.ConnectError Cannot connect to the provider. 无法链接服务提供方
500 GwError.ConvertAliyunApiError An error occurred while using channel API. 渠道协议转换时出现错误
500 GwError.IncorrectAliyunApi The API is not configured in this channel. 找不到api配置
500 GwError.IncorrectAliyunConfig The channel configuration does not exist or is invalid. 找不到渠道配置
500 GwError.IncorrectCluster The cluster route does not exist. 集群路由不存在
500 GwError.MissingParameter You must specify the parameter. 缺少必要参数
500 GwError.OverRateLimit The rate limit is exceeded. 达到限流值
500 GwError.SystemError A system error occurred. 系统错误
500 GwError.UnknownError A GW unknown error occurred. 未知错误
500 GwError.InvalidParameter The specified parameter is invalid. 无效的参数
500 DefaultErrorCode An unknown error occurred. 未知错误。

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

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