Skip to content

List user's DID keys

GET
/api/v1/auth/users/{userId}/did-keys
curl --request GET \
--url https://localhost:8080/api/v1/auth/users/example/did-keys \
--header 'Authorization: <Authorization>'

List all DID keys associated with a user; callers may only list their own keys

userId
required
string

User UUID (bare or urn:uuid) or did:key

List of DID keys

Media type application/json

The DID keys held for the authenticated caller

object
keys
Array<object>

A DID key held for a user, described independently of the KMS backing it

object
createdAt
string format: date-time
didDocument

The W3C DID document for a key, in did:key form

object
@context
string
assertionMethod
Array<string>
authentication

DID URLs into verificationMethod

Array<string>
id
string
verificationMethod
Array<object>

A public key in a DID document, published as a JWK

object
controller
string
id
string
publicKeyJwk
object
type
string
keyId
string
keyReference
string
keyVaultUrl

Deprecated: use keyReference

string
provider
string
publicKey
string
Example
{
"keys": [
{
"didDocument": {
"@context": "https://www.w3.org/ns/did/v1",
"id": "did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme",
"verificationMethod": [
{
"controller": "did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme",
"id": "did:key:zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme#zQ3shokFTS3brHcDQrn82RUDfCZESWL1ZdCEJwekUDPQiYBme",
"type": "JsonWebSignature2020"
}
]
}
}
]
}

Bad request - User ID required

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Unauthorized

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Forbidden - May only access your own DID keys

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

User not found

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Internal server error

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}