Create a DID key for a user
POST /api/v1/auth/did-key Select code sample Fetch cURL
Validate a credential and resolve the caller Next
Get DID key information
const url = 'https://localhost:8080/api/v1/auth/did-key';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"user@example.com","userId":"auth0|user-123"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}
curl --request POST \ --url https://localhost:8080/api/v1/auth/did-key \ --header 'Content-Type: application/json' \ --data '{ "email": "user@example.com", "userId": "auth0|user-123" }'
Create a DID key for the given IDP user in the configured key provider
Request Body
Section titled “Request Body ”User information
Media type application/json object email stringExample
user@example.com
userId string
Example
auth0|user-123
Responses
Section titled “ Responses ”200
Section titled “200 ”DID key created successfully
Media type application/json object keyId string message string success booleanExample
{ "keyId": "auth0-user-123", "message": "DID key created successfully", "success": true}
400
Section titled “400 ”Bad request - Invalid request body
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
401
Section titled “401 ”Unauthorized - Invalid API secret
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
500
Section titled “500 ”Internal server error
Media type application/json object error string error_description stringExample
{ "error": "Unauthorized", "error_description": "Invalid token"}
Previous Validate a credential and resolve the caller Next
Get DID key information