Create a DID key for a user
POST
/api/v1/auth/did-key
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
string
Example
user@example.com userId
string
Example
auth0|user-123Responses
Section titled “ Responses ”DID key created successfully
Media type application/json
object
keyId
string
message
string
success
boolean
Example
{ "keyId": "auth0-user-123", "message": "DID key created successfully", "success": true}Bad request - Invalid request body
Media type application/json
object
error
string
error_description
string
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Unauthorized - Invalid API secret
Media type application/json
object
error
string
error_description
string
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Internal server error
Media type application/json
object
error
string
error_description
string
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}