Disco Docs
Search
K

Personas

This page contains all relevant APIs interacting with Disco Personas.

Introduction

User

A User on the Disco platform is the holder and owner of its own identity. A User can be an individual or an organization. User have an Ethereum Address that is used with their wallet for access to their credentials. Users may, or may not, have a www domain and/or Ethereum Name Service (ENS) linked to their identity.

Persona

A Persona is a set of attributes that describes a User in a particular context. Currently, Disco supports one Persona per User (extendable to N Personas per User in future releases). A Persona may have multiple DIDs, and account Linkages assigned.
An example of a Persona Document
{
"id": "de0eae21-b88f-4f22-ad92-7ed99f7ea05c",
// Unique user ID assigned by Disco
"user": {
"id": "ae541371-590b-4dba-b783-5cde41cc0d3c"
},
// The User's DID(s) - most users will have a did:3 or a did:pkr ID, whereas
// organiozations may have a did:web ID
"dids": [
{
"did": "did:web:api.disco.xyz/v1/disco"
}
],
// Disco user handle
"handle": "Disco",
// Link to user's avatar
"avatarUri": "https://pbs.twimg.com/profile_images/1544599788464766976/Ib49kkdh_400x400.jpg",
// User bio
"bio": "Disco's ecosystem is build around our Verifiable Data Registry.",
// The User's DID and accossiated Ethereum Address
"ethAddress": "0x08936438bfb8e9b269f978d5327ad687f47g8c08",
// External account links that the user has linked to one their Disco DIDs
"links": [
{
"accountType": "Discord",
// Linked account handle
"handle": "Disco#1234",
// Verified by Disco
"verified": true,
// The user DID the linked to the account
"did": "did:web:api.disco.xyz/v1/disco",
"proof": "https://discord.com/channels/947857036257935390/975763597529600041/1078306074618236980"
},
{
"accountType": "Twitter",
"handle": "DiscoXYZ",
"verified": true,
"did": "did:web:api.disco.xyz/v1/disco",
"proof": "https://twitter.com/DiscoXYZ/status/1667219955002032136"
}
]
}

Use Cases

Get Persona for a DID

This response is less verbose as it only includes current snapshot of a DID's persona.
get
/v1/persona/did/metadata/{did}
Persona Meatadata

Returns Persona metadata for a DID holder. Persona metadata is composed of avatar links, username, color schemes, and verified account handles (such as Twitter, Discord, etc.).

Parameters
Path
did*
string
The holder's DID to retrieve Persona metadata for
Responses
200: OK
Returns a persona document for the DID owner
400: Bad Request
Bad Request

Usage example

Curl
JavaScript
curl --location 'https://api.disco.xyz/v1/persona/did/metadata/did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb' \
--header 'Authorization: Bearer <your Disco API key>'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <your Disco API key>");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.disco.xyz/v1/persona/did/metadata/did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Successful Response

{
"orgBrand": {
"textColor": null,
"brandColor": null,
"backgroundImage": null
},
"avatar": "https://uploads-ssl.webflow.com/634f227dc666d2739c1c3959/634f227dc666d26bd21c3a55_14-%20Evin%20McMullen%20original%20BW.png",
"accountLinks": [
{
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
"type": "Discord",
"handle": "heyevin"
},
{
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
"type": "Twitter",
"handle": "provenauthority"
}
],
"username": "provenauthority"
}

Get Persona for a DID

This response may be very verbose as it includes all accounts (re)link attempts and their proofs.
get
/v1/persona/did/{did}
Persona Metadata

Returns Persona metadata for a DID holder. Persona metadata is composed of avatar links, username, color schemes, and verified account handles (such as Twitter, Discord, etc.).

Parameters
Path
did*
string
Responses
200: OK
Returns a persona document for the DID owner
400: Bad Request
Bad Request

Usage example

Curl
JavaScript
curl --location 'https://api.disco.xyz/v1/credential/verify' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Authorization: Bearer <your Disco API key>' \
curl --location 'https://api.disco.xyz/v1/persona/did/did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb' \
--header 'Authorization: Bearer <your Disco API key>'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <your Disco API key>");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.disco.xyz/v1/persona/did/did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Successful Response

1
{
2
"id": "3045c158-af4a-417f-a67f-bc8f916b5408",
3
"user": {
4
"id": "12a9e548-a2fb-42c6-ba4b-e931127baa4a"
5
},
6
"dids": [
7
{
8
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
9
"ethAddr": "0x9c7b16e49c2f579453c45ca0bf7771a43dc61449"
10
}
11
],
12
"handle": "provenauthority",
13
"avatarUri": "https://uploads-ssl.webflow.com/634f227dc666d2739c1c3959/634f227dc666d26bd21c3a55_14-%20Evin%20McMullen%20original%20BW.png",
14
"bio": "GM and welcome to the Disco! ",
15
"ethAddress": "0x9c7b16e49c2f579453c45ca0bf7771a43dc61449",
16
"links": [ // This object holds all the account links for the ID
17
{
18
"accountType": "Discord",
19
"handle": "heyevin",
20
"verified": true,
21
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
22
"proof": "https://discord.com/channels/947857036257935390/975763597529600041/1128736725682892930"
23
},
24
{
25
"accountType": "Twitter",
26
"handle": "provenauthority",
27
"verified": true,
28
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
29
"proof": "https://twitter.com/provenauthority/status/1674454543420260352"
30
}
31
],
32
"metadata": {
33
"orgBrand": {
34
"textColor": null,
35
"brandColor": null,
36
"backgroundImage": null
37
},
38
"avatar": "https://uploads-ssl.webflow.com/634f227dc666d2739c1c3959/634f227dc666d26bd21c3a55_14-%20Evin%20McMullen%20original%20BW.png",
39
"accountLinks": [ // This object holds all link activity for linked accounts. A user can unlink/relink their accounts and this section will show an item for each linking attempt.
40
{
41
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
42
"type": "Discord",
43
"handle": "heyevin"
44
},
45
{
46
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
47
"type": "Discord",
48
"handle": "heyevin"
49
},
50
{
51
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
52
"type": "Twitter",
53
"handle": "provenauthority"
54
}
55
],
56
"username": "provenauthority"
57
},
58
"isOrg": true // If true it indicates that this identity is classified as an orginization.
59
}

Get Persona for an Ethereum address

This response may be very verbose as it includes all accounts (re)link attempts and their proofs.
get
/v1/persona/find/eth/{eoa}
Get persona by Ethereum Address

Returns a profile via its linked Ethereum Address. Usually in the format: 0xABC1234567890

Parameters
Path
eoa*
string
Ethereum Address
Responses
200: OK
Returns a persona document for the DID owner
400: Bad Request
Bad Request
404: Not Found
Person not found

Usage example

Curl
JavaScript
curl --location 'https://api.disco.xyz/v1/persona/find/eth/0x9c7b16e49c2f579453c45ca0bf7771a43dc61449' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <your Disco API key>'
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer <your Disco API key>");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.disco.xyz/v1/persona/find/eth/0x9c7b16e49c2f579453c45ca0bf7771a43dc61449", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Successful Response

{
"id": "3045c158-af4a-417f-a67f-bc8f916b5408",
"user": {
"id": "12a9e548-a2fb-42c6-ba4b-e931127baa4a"
},
"dids": [
{
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
"ethAddr": "0x9c7b16e49c2f579453c45ca0bf7771a43dc61449"
}
],
"handle": "provenauthority",
"avatarUri": "https://uploads-ssl.webflow.com/634f227dc666d2739c1c3959/634f227dc666d26bd21c3a55_14-%20Evin%20McMullen%20original%20BW.png",
"bio": "GM and welcome to the Disco! ",
"ethAddress": "0x9c7b16e49c2f579453c45ca0bf7771a43dc61449",
"links": [
{
"accountType": "Discord",
"handle": "heyevin",
"verified": true,
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
"proof": "https://discord.com/channels/947857036257935390/975763597529600041/1128736725682892930"
},
{
"accountType": "Discord",
"handle": "heyevin",
"verified": true,
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
"proof": "https://twitter.com/provenauthority/status/1674454543420260352"
},
{
"accountType": "Twitter",
"handle": "provenauthority",
"verified": true,
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
"proof": "https://twitter.com/provenauthority/status/1674454543420260352"
}
],
"metadata": {
"orgBrand": {
"textColor": null,
"brandColor": null,
"backgroundImage": null
},
"avatar": "https://uploads-ssl.webflow.com/634f227dc666d2739c1c3959/634f227dc666d26bd21c3a55_14-%20Evin%20McMullen%20original%20BW.png",
"accountLinks": [
{
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
"type": "Discord",
"handle": "heyevin"
},
{
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
"type": "Discord",
"handle": "heyevin"
},
{
"did": "did:3:kjzl6cwe1jw14b7xqq94oiy0lcnndgyt0p3vtlnsscpljosx6gom46qkxcv8sjb",
"type": "Twitter",
"handle": "provenauthority"
}
],
"username": "provenauthority"
},
"isOrg": true
}

Search for Profile by account linkages

Returns DIDs of matching handles given search input. Can search for Twitter, Discord, or Domain handle in one endpoint.
get
https://api.disco.xyz/v1/search/?handle=provenauthority
Search by any handle
Parameters
Query
handle
String
handle of Account Linked to search for. This can be a twitter, discord, or domain.
Responses
200: OK
Successful Operation
401: Unauthorized
Unauthorized. Request not authenticated, API token is missing or invalid!
403: Forbidden
Forbidden. You don't have access to the relevant resource.
404: Not Found
Resource not found