調(diào)用IssueNormalVerifiableVC頒發(fā)普通可驗(yàn)證聲明。可以指定 DID1 做為頒發(fā)者為 DID2 頒發(fā)自定義的可驗(yàn)證聲明。
調(diào)試
您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
請求參數(shù)
名稱 | 類型 | 是否必選 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | IssueNormalVerifiableVC |
系統(tǒng)規(guī)定參數(shù)。取值:IssueNormalVerifiableVC。 |
BareClaimStructBody.N.Claim | String | 是 | "test" |
BareClaimStructBody.N.Claim是自定義類的結(jié)構(gòu)體BareClaim的屬性。BareClaim結(jié)構(gòu)體的請見說明: |
ClientToken | String | 是 | 01357967-61d1-42a9-8a90-f0dd8a161411 |
UUID,作為冪等性標(biāo)識token。 |
Expiration | Long | 是 | -1 |
過期時(shí)間。置為-1,不會過期。 |
Issuer | String | 是 | "did:mychain:xxx" |
頒發(fā)者did,該did必須為調(diào)用者自己或者自己代理的did。 |
Subject | String | 是 | "did:mychain:xxx" |
接收者did |
BareClaimStructBody.N.ClaimType | String | 否 | "" |
BareClaimStructBody.N.ClaimType是自定義類的結(jié)構(gòu)體BareClaim的屬性。BareClaim結(jié)構(gòu)體的請見說明: |
RegionId | String | 否 | "" |
阿里云網(wǎng)關(guān)會自動填入regionId,不需要手動填入。 |
BareClaim結(jié)構(gòu)體包含以下屬性:
1. Claim
數(shù)據(jù)類型String, 必填,是用戶自定義聲明內(nèi)容;
2. ClaimType
數(shù)據(jù)類型String,非必填,是用戶自定義聲明類型;
返回?cái)?shù)據(jù)
名稱 | 類型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | "4D1E29A7-17D6-48AD-B5AF-F44FAB68D87D" |
POP網(wǎng)關(guān)自動生成的id,用于日志查詢相關(guān)請求。 |
ResultCode | String | "OK" |
API調(diào)用結(jié)果碼,成功為OK,失敗的結(jié)果碼參考下面的"結(jié)果碼詳情"表格 |
ResultMessage | String | "" |
API調(diào)用結(jié)果描述,比如調(diào)用失敗的時(shí)候會顯示具體的錯(cuò)誤信息 |
Success | Boolean | true |
返回操作的狀態(tài)碼:成功為true,失敗為false; |
VerifiableClaimContent | String | "{\"proof\":{\"type\":\"ecdsa\",\"verificationMethod\":\"did:mychain:xxx#keys-1\",\"signatureValue\":\"xxx\"},\"content\":{\"issuanceDate\":1590127960785,\"subject\":\"did:mychain:xxx\",\"expire\":-1,\"claim\":\"test\",\"id\":\"vc:mychain:xxx\",\"type\":[\"VerifiableCredential\"],\"version\":\"0.7.0\",\"@context\":\"https://www.w3.org/2018/credentials/v1\",\"issuer\":\"did:mychain:xxx\",\"status\":{\"id\":\"vc:mychain:xxx\",\"type\":\"BlockChainStatusList\"}}}" |
可驗(yàn)證聲明的完整聲明, 為json對象的字符串。 |
VerifiableClaimId | String | "vc:mychain:xxx" |
可驗(yàn)證聲明ID。 |
示例
請求示例
http(s)://[Endpoint]/?Action=IssueNormalVerifiableVC
&BareClaimStructBody.1.Claim="test"
&ClientToken=01357967-61d1-42a9-8a90-f0dd8a161411
&Expiration=-1
&Issuer="did:mychain:xxx"
&Subject="did:mychain:xxx"
&<公共請求參數(shù)>
正常返回示例
JSON
格式
{"RequestId":"\"4D1E29A7-17D6-48AD-B5AF-F44FAB68D87D\"","VerifiableClaimContent":"\"{\\\"proof\\\":{\\\"type\\\":\\\"ecdsa\\\",\\\"verificationMethod\\\":\\\"did:mychain:xxx#keys-1\\\",\\\"signatureValue\\\":\\\"xxx\\\"},\\\"content\\\":{\\\"issuanceDate\\\":1590127960785,\\\"subject\\\":\\\"did:mychain:xxx\\\",\\\"expire\\\":-1,\\\"claim\\\":\\\"test\\\",\\\"id\\\":\\\"vc:mychain:xxx\\\",\\\"type\\\":[\\\"VerifiableCredential\\\"],\\\"version\\\":\\\"0.7.0\\\",\\\"@context\\\":\\\"https://www.w3.org/2018/credentials/v1\\\",\\\"issuer\\\":\\\"did:mychain:xxx\\\",\\\"status\\\":{\\\"id\\\":\\\"vc:mychain:xxx\\\",\\\"type\\\":\\\"BlockChainStatusList\\\"}}}\"","ResultMessage":"\"\"","ResultCode":"\"OK\"","Success":"true","VerifiableClaimId":"\"vc:mychain:xxx\""}
錯(cuò)誤碼
HttpCode | 錯(cuò)誤碼 | 錯(cuò)誤信息 | 描述 |
---|---|---|---|
500 | AchievingError.RedisLock | Failed to retrieve the synchronized lock. | 獲取同步鎖失敗 |
500 | AsyncCreationFailure.DID | Did not find the corresponding item of Mapping while creating DID. | Did創(chuàng)建中未發(fā)現(xiàn)Mapping對應(yīng)項(xiàng)目 |
500 | AuthenticationFailure | Authentication failed. | 認(rèn)證未通過 |
500 | CertificationDuplicate.DID | The specified DID is already bound to other user information. | 該did已和其他實(shí)名信息綁定 |
500 | CertificationNotSupport | The tenant has not activated Identity Authentication. | 該租戶沒有開通身份認(rèn)證 |
500 | ChildDIDCannotBeDerivedFromRootDID.DIDError | The child DID cannot be extended from the root DID. | 根DID無法派生出子DID |
500 | Confliction.ServiceType | A conflict occurred to service type. | 服務(wù)類型沖突 |
500 | ConflictionInUpdating.DID | An error occurred while updating the DID. | Did更新沖突 |
500 | ContainsUnsupportedType.VerificableClaim | The verifiable claim contains unsupported type. | 可驗(yàn)證聲明包含不支持的類型 |
500 | CountNotEnough.MaskedIdentityVerification | The number of desensitized identity verification is insufficient. | 脫敏身份驗(yàn)證次數(shù)不足 |
500 | CreationError.DID | Failed to create a DID. Please contact the developer. | did生成失敗,請聯(lián)系開發(fā)人員 |
500 | CreationFailure.PreservedAccountResolverReader | Failed to create the reserved account ResolverReader. | 創(chuàng)建預(yù)留賬戶ResolverReader失敗 |
500 | CreationFailure.ServiceType | Failed to save service type into blockchain. | 服務(wù)類型上鏈?zhǔn)?/td> |
500 | DecryptionError.KMS | Failed to decrypt. | 解密失敗 |
500 | DeletionFailure.VerifiableClaimRepository | Failed to delete VC. | 刪除VC失敗 |
500 | DidNotPass.Check | You did not pass the verification. | 未通過審核 |
500 | Duplicate.ServiceId | The service ID is duplicated. | service id重復(fù) |
500 | EncryptionError.KMS | An encryption error occurred. | 加密錯(cuò)誤 |
500 | Error.HttpCallingCloudShield | An error occurred while calling Cloud Security Services using HTTP. | http調(diào)用云盾出錯(cuò) |
500 | ErrorOccurred.HttpCallingCloudShield | An error occurred while calling KMS using HTTP. | http調(diào)用kms出錯(cuò) |
500 | ErrorReturned.REST | A return error occurred to the BaaS Rest service. | BaaS Rest服務(wù)返回錯(cuò)誤 |
500 | Expired.VerifiableClaim | The verifiable claim is out of date. | 可驗(yàn)證聲明已過期 |
500 | Failure.CorporateFaceVerification | The legal person face verification failed. | 企業(yè)法人刷臉結(jié)果為失敗 |
500 | GeneratingPublicPrivateKeyPairError.KMS | Failed to create public and private key pairs. | 創(chuàng)建公私鑰對失敗 |
500 | GeneratingSignatureError.KMS | Failed to compute signatures. | 計(jì)算簽名失敗 |
500 | HasBeenSetAsInvalid.VerifiableClaim | The verifiable claim has already been set as invalid. | 可驗(yàn)證聲明已經(jīng)被置為無效 |
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. | 企業(yè)法人刷臉還在進(jìn)行中 |
500 | InternalRPCError | An internal RPC error occurred. | 內(nèi)部RPC錯(cuò)誤 |
500 | InUpdating.DID | The DID is still being updated. | Did正在更新中 |
500 | InvalidCorrespondingKey.DID | An error occurred in the corresponding key of DID. | DID對應(yīng)KEY異常 |
500 | InvalidType.DID | The DID type is abnormal. | DID類型異常 |
500 | InvalidVerificationClaim | The signature of the verifiable claim is invalid. | 可驗(yàn)證聲明簽名無效 |
500 | NotAuthorized.Creator | The creator is not authorized. | 創(chuàng)建者無權(quán)限 |
500 | NotDoneYet.FaceVerification | The user has not performed face verification. | 用戶還未刷臉 |
403 | NotEnoughAuthorization | You are not authorized to perform the operation. | 權(quán)限不足 |
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. | 頒發(fā)者不存在 |
500 | NotExist.ServiceType | The specified service type does not exist. | service type不存在 |
404 | NotExist.Tenant | The tenant does not exist. | 租戶不存在 |
404 | NotExist.VerificableClaim | The verifiable claim does not exist. | 可驗(yàn)證聲明不存在 |
404 | NotRegistered.CurrentInterfacePermission | You are not authorized for this interface. | 未開通該接口權(quán)限 |
404 | NotRegistered.DIDService | You have not activated the DIS service. | 用戶DIS服務(wù)未開通 |
500 | ParametersInitializationError.SDK | Failed to initialize SDK parameters. | 初始化SDK參數(shù)錯(cuò)誤 |
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. | 服務(wù)類型查詢失敗 |
500 | ReadFailure.VerifiableClaimRepository | Failed to query VC. | 讀取VC失敗 |
500 | RequestContentError | Failed to retrieve the requested content. | 獲取請求內(nèi)容錯(cuò)誤 |
500 | RequestParamsError | The requested parameters are incorrect. | 請求參數(shù)有誤 |
500 | ReturnedResultNotOk.Plus | The result returned from BaaS Plus is not OK. | baas plus返回結(jié)果不為OK |
500 | SaveFailure.VerifiableClaimRepository | Failed to save VC into repository. | 存儲VC到倉庫失敗 |
500 | SavingRequestError | Failed to save the requested content. | 保存請求內(nèi)容錯(cuò)誤 |
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. | 可驗(yàn)證聲明狀態(tài)不正常 |
500 | Timeout.FaceVerification | Face verification has timed out. | 刷臉超時(shí) |
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. | 自定義服務(wù)超過上限 |
500 | TypeError.DID | The DID type is invalid. | did類型錯(cuò)誤 |
500 | TypeNotSupport.VerifiableClaimRepository | The VC repository type is not supported. | 未支持的VC倉庫類型 |
500 | VerificationFailure.DID | You have not passed DID verification. | did驗(yàn)證未通過 |
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錯(cuò)誤 |
500 | GwError.ConnectError | Cannot connect to the provider. | 無法鏈接服務(wù)提供方 |
500 | GwError.ConnectRefused | The provider service connection is denied. | 服務(wù)鏈接拒絕 |
500 | GwError.ConnectTimeout | RPC timed out. | RPC超時(shí) |
500 | GwError.ConnectTimeout | The service has timed out. | 服務(wù)超時(shí) |
500 | GwError.ConvertAliyunApiError | An error occurred while using channel API. | 渠道協(xié)議轉(zhuǎn)換時(shí)出現(xiàn)錯(cuò)誤 |
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. | 默認(rèn)服務(wù)不存在 |
500 | GwError.IncorrectRoute | The region route does not exist. | 區(qū)域路由不存在 |
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. | 無效的參數(shù) |
500 | GwError.IpAccessDenied | The IP access is denied. | 訪問ip受限 |
500 | GwError.MissingParameter | You must specify the parameter. | 缺少必要參數(shù) |
500 | GwError.OverRateLimit | The rate limit is exceeded. | 達(dá)到限流值 |
500 | GwError.RegionProxyError | The region proxy server API is unavailable. | api服務(wù)不可用 |
500 | GwError.RegionProxyError | The region proxy server connection is denied. | 區(qū)域代理鏈接拒絕 |
500 | GwError.RegionProxyError | The response returned by the region proxy server is invalid. | 區(qū)域代理返回信息無效 |
500 | GwError.ResponseSignVerifyError | Failed to verify the provider signature. | 服務(wù)簽名驗(yàn)證失敗 |
500 | GwError.SystemError | A system error occurred. | 系統(tǒng)錯(cuò)誤 |
500 | GwError.TenantNotFound | The specified tenant does not exist. | 找不到租戶 |
500 | GwError.TransportError | A transport error occurred. | 傳輸錯(cuò)誤 |
500 | GwError.UnknownError | A GW unknown error occurred. | 未知錯(cuò)誤 |
500 | GwError.WhiteListDenied | The white list is denied. | 白名單受限 |
500 | DefaultErrorCode | An unknown error occurred. | 未知錯(cuò)誤。 |
訪問錯(cuò)誤中心查看更多錯(cuò)誤碼。
訪問錯(cuò)誤中心查看更多錯(cuò)誤碼。