調用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. | 未知錯誤。 |
訪問錯誤中心查看更多錯誤碼。
訪問錯誤中心查看更多錯誤碼。