Store Private Key
Store an encrypted blockchain private key for the authenticated user. Replaces any existing key.
Authorization
AuthorizationRequiredBearer <token>🚀 OAuth2 authentication via secure identity provider
In: header
Scope: openid, email, profile
AuthorizationRequiredBearer <token>🎫 JWT Bearer token from OAuth2 login or direct token
In: header
Authorization<token>🗝️ API key in format: 'Bearer sk-xxxxxx'
In: header
Request Body
application/jsonRequiredprivate_keyRequiredPrivate KeyUser's blockchain private key
Response Body
Successful Response
TypeScript Definitions
Use the response body type in TypeScript.
[key: string]anyValidation Error
TypeScript Definitions
Use the response body type in TypeScript.
detailDetailcurl -X POST "https://example.com/api/v1/auth/private-key" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"private_key": "string"
}'const body = JSON.stringify({
"private_key": "string"
})
fetch("https://example.com/api/v1/auth/private-key", {
headers: {
"Authorization": "Bearer <token>"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/api/v1/auth/private-key"
body := strings.NewReader(`{
"private_key": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/api/v1/auth/private-key"
body = {
"private_key": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
})
print(response.text){}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}How is this guide?
Register User POST
Register a new user.
Login POST
Log in a user and return JWT tokens. Simply provide your email and password directly in the request body: ```json { "email": "user@example.com", "password": "yourpassword" } ``` The response will contain an access_token that should be used in the Authorization header for protected endpoints, with the format: `Bearer {access_token}`