API-of-Me
Search…
Quickstart
This guide aims to get you up and running and familiar with the Exchange API in about 15 minutes. We'll teach you how to
  • create and manage DID
  • issue and revoke Verifiable Credentials
NOTE: It assumes you already have an approved account in dev.meeco.me portal and subscription key to access exchange API.
you can signup for a developer account here https://dev.meeco.me/signup

Create a DID for a holder

1
curl -d -i -v -X POST "https://sandbox.meeco.me/exchange/dids/hedera" \
2
-H "Meeco-Subscription-Key: replace-it-with-your-subscription-key"
Copied!
Response header
1
...
2
exchange-private-key: 302e020100300506032b657004220420f4011a192ba599b54adca7f95dfbd73c22dca
3
000000000000000000000000000
4
...
Copied!
Response body
1
{
2
"@context": "https://www.w3.org/ns/did/v1",
3
"id": "did:hedera:testnet:example;hedera:testnet:fid=0.0.78464",
4
"publicKey": [
5
{
6
"id": "did:hedera:testnet:example;hedera:testnet:fid=0.0.78464#did-root-key",
7
"type": "Ed25519VerificationKey2018",
8
"controller": "did:hedera:testnet:example;hedera:testnet:fid=0.0.78464",
9
"publicKeyBase58": "EKQfP6GMyhWuzZYw4QNTnrM4EgRPgccQViSAMPEsX7wz"
10
}
11
],
12
"authentication": [
13
"did:hedera:testnet:example;hedera:testnet:fid=0.0.78464#did-root-key"
14
],
15
"assertionMethod": [
16
"did:hedera:testnet:example;hedera:testnet:fid=0.0.78464#did-root-key"
17
]
18
}
Copied!
The above request generates a key and DID document for a new DID. Also registers the DID on Hedera when using the "hedera" method. The new private key used to create DID is returned in the header.
Note down DID did:hedera:testnet:example;hedera:testnet:fid=0.0.78464

Issue Learning Credentials for Holder DID

Retrieve a list of credential types that can be issued by the exchange.
1
curl -i -v -X GET "https://sandbox.meeco.me/exchange/credentials/types" \
2
-H "Meeco-Subscription-Key: replace-it-with-your-subscription-key"
Copied!
Response
1
{
2
"credentials": [
3
{
4
"label": "QLD Driver Licence",
5
"type": "DriverLicenceCredential",
6
"available": true,
7
"domainHint": "https://broker.sandbox.connectid.com.au/auth/realms/connectid",
8
"schema": "https://vc-schemas.meeco.me/credentials/driverLicence/1.0/schema.json",
9
"contexts": [
10
"https://vc-schemas.meeco.me/credentials/driverLicence/1.0/context.json"
11
]
12
},
13
{
14
"label": "NSW Driver Licence",
15
"type": "DriverLicenceCredential",
16
"available": false,
17
"domainHint": "https://broker.sandbox.connectid.com.au/auth/realms/connectid",
18
"schema": "https://vc-schemas.meeco.me/credentials/driverLicence/1.0/schema.json",
19
"contexts": [
20
"https://vc-schemas.meeco.me/credentials/driverLicence/1.0/context.json"
21
]
22
},
23
{
24
"label": "Learning Record",
25
"type": "LearningRecordCredential",
26
"available": true,
27
"domainHint": "",
28
"schema": "https://vc-schemas.meeco.me/credentials/learningRecord/1.0/schema.json",
29
"contexts": [
30
"https://vc-schemas.meeco.me/credentials/learningRecord/1.0/context.json"
31
]
32
}
33
]
34
}
Copied!
Issue a credential of the type LearningRecordCredential
replace subjectDid in following request with earlier created holder DID
1
curl -i -v -X POST "https://sandbox.meeco.me/exchange/credentials/types/LearningRecordCredential" \
2
-H "Content-Type: application/json" \
3
-H "Meeco-Subscription-Key: replace-it-with-your-subscription-key" \
4
-d '{"subjectDid": "did:hedera:testnet:5ZpDhGKtHb1LAnQE1ry2bw1YTkm3KWbru7TsYkfYEdq9;hedera:testnet:fid=0.0.78464","claims": {"status": "compliant","grade": "95","completionDate": "2021-01-02T00:00:00+00:00","course": {"id": "122345","courseCode": "ws101","name": "WorkSafe Basic Training Module","version": "2021-01-01T00:00:00+00:00","provider": "WorkPro Training"}},"expiration": "2025-01-01T00:00:00Z"}'
Copied!
The new credential signed by the issuer's key will be returned
Response
1
{
2
"credential": {
3
"@context": [
4
"https://vc-schemas.meeco.me/credentials/learningRecord/1.0/context.json",
5
"https://www.w3.org/2018/credentials/v1"
6
],
7
"type": ["VerifiableCredential"],
8
"issuer": {
9
"id": "did:hedera:testnet:3UehyMhjQNDVWSPHEcpBRfPB5gYLtRxukHfJgV2sdfew;hedera:testnet:fid=0.0.78464"
10
},
11
"credentialSubject": {
12
"completionDate": "2021-01-02T00:00:00+00:00",
13
"course": {
14
"courseCode": "ws101",
15
"id": "122345",
16
"name": "WorkSafe Basic Training Module",
17
"provider": "WorkPro Training",
18
"version": "2021-01-01T00:00:00+00:00"
19
},
20
"grade": "95",
21
"status": "compliant",
22
"type": "LearningRecordCredential",
23
"id": "did:hedera:testnet:example;hedera:testnet:fid=0.0.78464"
24
},
25
"proof": {
26
"type": "Ed25519Signature2018",
27
"proofPurpose": "assertionMethod",
28
"created": "2021-06-10T03:29:57.000Z",
29
"verificationMethod": "did:hedera:testnet:3UehyMhjQNDVWSPHEcpBRfPB5gYLtRxukHfJgV2sdfew;hedera:testnet:fid=0.0.78464#did-root-key",
30
"jws": "Iy0SNzS6tRWz__nIt8Fb4qwkEntuY0sZm6j8osEHsAhCJGog84aVRVqOaflcwW3L1NJnofqex-wQbFugWonEBA"
31
},
32
"issuanceDate": "2021-06-10T03:29:57.000Z",
33
"id": "urn:uuid:c8402ffe-14b4-4ff9-857c-1763459f17d2",
34
"expirationDate": "2025-01-01T00:00:00.000Z",
35
"credentialSchema": {
36
"id": "https://vc-schemas.meeco.me/credentials/learningRecord/1.0/schema.json",
37
"type": "JSONSchemaValidator2019"
38
}
39
},
40
"credentialHash": "2fPrkyXhHmEXDFVkAPLj621e5sLBktPvZPDMBnroTRsZ"
41
}
Copied!
note down id of credential urn:uuid:c8402ffe-14b4-4ff9-857c-1763459f17d2

Retrieve credentials issued for a DID

An Issuer can issue credentials to be held by a particular DID, These are stored encrypted by the subject's public key, and can be downloaded by the wallet.
1
curl -i -v -X GET "https://sandbox.meeco.me/exchange/credentials/stored/did%3Ahedera%3Atestnet%3AES6uGn1298qRYpM9Y6n5aj8DtPnpZHZXasdfedfeere%3Bhedera%3Atestnet%3Afid%3D0.0.78464" \
2
-H "Meeco-Subscription-Key: replace-it-with-your-subscription-key"
Copied!
returns encrypted JWT Verifiable credentials that can be decrypted by the holder's private key and store in a wallet.
Response
1
[
2
{
3
"vc": "mkCF7XbWuojmO4wXkt1IliGUQ4K3FIZHK9eOfzTdfIG9csfk065Gt1ZJbITQSJRjN0UJ+thI4aKHErA5tWsVhKR8Lf9bQhwe48FgnMMjy8kv/...",
4
"nonce": "BxM5p+PfTlsDKx2+2jCrSlf73bOB9Vg4"
5
}
6
]
Copied!

Retrieves the status of issued credentials

use previously noded cred id to retrieve the current status of issued credentials
1
curl -i -v -X GET "https://sandbox.meeco.me/exchange/credentials/urn%3Auuid%3Ac8402ffe-14b4-4ff9-857c-1763459f17d2" \
2
-H "Meeco-Subscription-Key: replace-it-with-your-subscription-key"
Copied!
Response
1
{
2
"status": "ACTIVE"
3
}
Copied!

Revoke issued Credentials

Issuers can only revoke credentials they have issued
1
curl -i -v -X DELETE "https://sandbox.meeco.me/exchange/credentials/urn%3Auuid%3Ac8402ffe-14b4-4ff9-857c-1763459f17d2" \
2
-H "Meeco-Subscription-Key: replace-it-with-your-subscription-key"
Copied!
Response
1
HTTP/1.1 202 Accepted
2
3
Accepted
Copied!

Verify credentials status after revoking

use previously noded cred id to retrieve the current status of issued credentials
1
curl -i -v -X GET "https://sandbox.meeco.me/exchange/credentials/urn%3Auuid%3Ac8402ffe-14b4-4ff9-857c-1763459f17d2" \
2
-H "Meeco-Subscription-Key: replace-it-with-your-subscription-key"
Copied!
Response
1
{
2
"status": "REVOKED"
3
}
Copied!
Last modified 13d ago