Skip to content
English
  • There are no suggestions because the search field is empty.

Create a DID key for a user

POST /api/v1/auth/did-key Select code sample Fetch cURL
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-123

Responses

Section titled “ Responses ”

200

Section titled “200 ”

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}

400

Section titled “400 ”

Bad request - Invalid request body

Media type application/json object error string error_description string
Example
{  "error": "Unauthorized",  "error_description": "Invalid token"}

401

Section titled “401 ”

Unauthorized - Invalid API secret

Media type application/json object error string error_description string
Example
{  "error": "Unauthorized",  "error_description": "Invalid token"}

500

Section titled “500 ”

Internal server error

Media type application/json object error string error_description string
Example
{  "error": "Unauthorized",  "error_description": "Invalid token"}
Previous
Validate a credential and resolve the caller
Next
Get DID key information