Generate a signing key pair
curl --request POST \
--url https://gobl.dev/v0/keygenimport requests
url = "https://gobl.dev/v0/keygen"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://gobl.dev/v0/keygen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gobl.dev/v0/keygen",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gobl.dev/v0/keygen"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gobl.dev/v0/keygen")
.asString();require 'uri'
require 'net/http'
url = URI("https://gobl.dev/v0/keygen")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"private": {
"kty": "EC",
"crv": "P-256",
"alg": "ES256",
"use": "sig",
"kid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": "<string>",
"y": "<string>",
"d": "<string>"
},
"public": {
"kty": "EC",
"crv": "P-256",
"alg": "ES256",
"use": "sig",
"kid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": "<string>",
"y": "<string>",
"d": "<string>"
}
}Signing
Generate a signing key pair
Creates a new ES256 (ECDSA P-256) key pair for signing and verification.
POST
/
keygen
Generate a signing key pair
curl --request POST \
--url https://gobl.dev/v0/keygenimport requests
url = "https://gobl.dev/v0/keygen"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://gobl.dev/v0/keygen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gobl.dev/v0/keygen",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://gobl.dev/v0/keygen"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gobl.dev/v0/keygen")
.asString();require 'uri'
require 'net/http'
url = URI("https://gobl.dev/v0/keygen")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"private": {
"kty": "EC",
"crv": "P-256",
"alg": "ES256",
"use": "sig",
"kid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": "<string>",
"y": "<string>",
"d": "<string>"
},
"public": {
"kty": "EC",
"crv": "P-256",
"alg": "ES256",
"use": "sig",
"kid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"x": "<string>",
"y": "<string>",
"d": "<string>"
}
}⌘I