调用GetDID查询生成DID的公钥。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetDID |
系统规定参数。取值:GetDID。 |
DID | String | 是 | did:mychain:xxx |
需要查询的did字符串。 |
RegionId | String | 否 | "" |
阿里云网关会自动填入regionId,不需要手动填入。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Doc | String | "{\"creator\":\"did:mychain:xxx\",\"created\":\"2020-05-22T13:59:49+0800\",\"service\":[],\"index\":[],\"id\":\"did:mychain:xxx\",\"publicKey\":[{\"controller\":\"did:mychain:xxx\",\"id\":\"keys-1\",\"publicKey\":\"xxx\",\"type\":\"Secp256k1VerificationKey2018\"}],\"type\":\"Corporate\",\"@context\":\"https://w3id.org/did/v1\",\"updated\":\"2020-05-22T13:59:49+0800\",\"version\":0,\"authentication\":[\"keys-1\"]}" |
指定DID相关的service doc信息; |
RequestId | String | "2C93E421-AD9D-4ABE-B519-6E1ACD18934C" |
阿里云网关的请求id,用于日志检索请求详情。 |
ResultCode | String | "OK" |
API调用结果码,成功为“OK”,失败的结果码参考下面的"结果码详情"表格 |
ResultMessage | String | ”“ |
API调用结果描述,比如调用失败的时候会显示具体的错误信息 |
Success | Boolean | true |
返回操作的状态码:成功为true,失败为false; |
示例
请求示例
http(s)://[Endpoint]/?Action=GetDID
&DID=did:mychain:xxx
&<公共请求参数>
正常返回示例
JSON
格式
{"RequestId":"\"2C93E421-AD9D-4ABE-B519-6E1ACD18934C\"","Doc":"\"{\\\"creator\\\":\\\"did:mychain:xxx\\\",\\\"created\\\":\\\"2020-05-22T13:59:49+0800\\\",\\\"service\\\":[],\\\"index\\\":[],\\\"id\\\":\\\"did:mychain:xxx\\\",\\\"publicKey\\\":[{\\\"controller\\\":\\\"did:mychain:xxx\\\",\\\"id\\\":\\\"keys-1\\\",\\\"publicKey\\\":\\\"xxx\\\",\\\"type\\\":\\\"Secp256k1VerificationKey2018\\\"}],\\\"type\\\":\\\"Corporate\\\",\\\"@context\\\":\\\"https://w3id.org/did/v1\\\",\\\"updated\\\":\\\"2020-05-22T13:59:49+0800\\\",\\\"version\\\":0,\\\"authentication\\\":[\\\"keys-1\\\"]}\"","ResultMessage":"”“","ResultCode":"\"OK\"","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 | ContainsUnsupportedType.VerificableClaim | The verifiable claim contains unsupported type. | 可验证声明包含不支持的类型 |
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 | Expired.VerifiableClaim | The verifiable claim is out of date. | 可验证声明已过期 |
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 | HasBeenSetAsInvalid.VerifiableClaim | The verifiable claim has already been set as invalid. | 可验证声明已经被置为无效 |
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 | InvalidVerificationClaim | The signature of the verifiable claim is invalid. | 可验证声明签名无效 |
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.CertificateRecipient | The claim recipient does not exist. | 声明接受方不存在 |
404 | NotExist.CertifyId | The specified CertifyId does not exist. | certifyId不存在 |
404 | NotExist.DID | The specified DID does not exist. | Did不存在 |
404 | NotExist.Issuer | The issuer does not exist. | 颁发者不存在 |
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 | 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 | An RPC error occurred. | Rpc错误 |
500 | GwError.ConnectError | Cannot connect to the provider. | 无法链接服务提供方 |
500 | GwError.ConnectRefused | The provider service connection is denied. | 服务链接拒绝 |
500 | GwError.ConnectTimeout | RPC timed out. | RPC超时 |
500 | GwError.ConnectTimeout | The service has timed out. | 服务超时 |
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 ID does not exist. | 集群id不存在 |
500 | GwError.IncorrectCluster | The cluster is not activated. | 集群没有激活 |
500 | GwError.IncorrectCluster | The cluster route does not exist. | 集群路由不存在 |
500 | GwError.IncorrectDefaultService | The default service does not exist. | 默认服务不存在 |
500 | GwError.IncorrectRoute | The region route does not exist. | 区域路由不存在 |
500 | GwError.IncorrectRoute | The route does not exist. | 找不到路由 |
500 | GwError.IncorrectRoute | The route information does not exist. | 找不到路由信息 |
500 | GwError.InvalidAliyunUser | The specified Alibaba Cloud user information is invalid. | 无效的阿里云用户信息 |
500 | GwError.InvalidParameter | The specified parameter is invalid. | 无效的参数 |
500 | GwError.IpAccessDenied | The IP access is denied. | 访问ip受限 |
500 | GwError.MissingParameter | You must specify the parameter. | 缺少必要参数 |
500 | GwError.OverRateLimit | The rate limit is exceeded. | 达到限流值 |
500 | GwError.RegionProxyError | The region proxy server API is unavailable. | api服务不可用 |
500 | GwError.RegionProxyError | The region proxy server connection is denied. | 区域代理链接拒绝 |
500 | GwError.RegionProxyError | The response returned by the region proxy server is invalid. | 区域代理返回信息无效 |
500 | GwError.ResponseSignVerifyError | Failed to verify the provider signature. | 服务签名验证失败 |
500 | GwError.SystemError | A system error occurred. | 系统错误 |
500 | GwError.TenantNotFound | The specified tenant does not exist. | 找不到租户 |
500 | GwError.TransportError | A transport error occurred. | 传输错误 |
500 | GwError.UnknownError | A GW unknown error occurred. | 未知错误 |
500 | GwError.WhiteListDenied | The white list is denied. | 白名单受限 |
500 | DefaultErrorCode | An unknown error occurred. | 未知错误。 |
访问错误中心查看更多错误码。
访问错误中心查看更多错误码。