Auth
Authentication and session endpoints
Post Auth Verify
Verify an email address by requesting a one-time password.
Request Body
application/jsonRequiredemailRequiredstringFormat:
"email"Response Body
curl -X POST "https://example.com/auth/verify" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com"
}'const body = JSON.stringify({
"email": "user@example.com"
})
fetch("https://example.com/auth/verify", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/auth/verify"
body := strings.NewReader(`{
"email": "user@example.com"
}`)
req, _ := http.NewRequest("POST", url, body)
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/auth/verify"
body = {
"email": "user@example.com"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Empty
curl -X POST "https://example.com/auth/passkeys/register/options"fetch("https://example.com/auth/passkeys/register/options")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/auth/passkeys/register/options"
req, _ := http.NewRequest("POST", url, nil)
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/auth/passkeys/register/options"
response = requests.request("POST", url)
print(response.text)Empty
Post Auth Passkeys Register Verify
Verify webauthn passkey registration.
Request Body
application/jsonRequirednameRequiredstringidRequiredstringrawIdRequiredstringresponseRequiredobjectauthenticatorAttachmentRequiredunknownclientExtensionResultsunknowntypeRequiredstringResponse Body
curl -X POST "https://example.com/auth/passkeys/register/verify" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"id": "string",
"rawId": "string",
"response": {
"clientDataJSON": "string",
"attestationObject": "string",
"authenticatorData": "string",
"transports": null,
"publicKeyAlgorithm": null,
"publicKey": "string"
},
"authenticatorAttachment": null,
"clientExtensionResults": null,
"type": "string"
}'const body = JSON.stringify({
"name": "string",
"id": "string",
"rawId": "string",
"response": {
"clientDataJSON": "string",
"attestationObject": "string",
"authenticatorData": "string",
"transports": null,
"publicKeyAlgorithm": null,
"publicKey": "string"
},
"authenticatorAttachment": null,
"clientExtensionResults": null,
"type": "string"
})
fetch("https://example.com/auth/passkeys/register/verify", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/auth/passkeys/register/verify"
body := strings.NewReader(`{
"name": "string",
"id": "string",
"rawId": "string",
"response": {
"clientDataJSON": "string",
"attestationObject": "string",
"authenticatorData": "string",
"transports": null,
"publicKeyAlgorithm": null,
"publicKey": "string"
},
"authenticatorAttachment": null,
"clientExtensionResults": null,
"type": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
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/auth/passkeys/register/verify"
body = {
"name": "string",
"id": "string",
"rawId": "string",
"response": {
"clientDataJSON": "string",
"attestationObject": "string",
"authenticatorData": "string",
"transports": null,
"publicKeyAlgorithm": null,
"publicKey": "string"
},
"authenticatorAttachment": null,
"clientExtensionResults": null,
"type": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Empty
curl -X POST "https://example.com/auth/passkeys/authenticate/options"fetch("https://example.com/auth/passkeys/authenticate/options")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/auth/passkeys/authenticate/options"
req, _ := http.NewRequest("POST", url, nil)
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/auth/passkeys/authenticate/options"
response = requests.request("POST", url)
print(response.text)Empty
Verify passkey authentication
Request Body
application/jsonRequiredidRequiredstringrawIdRequiredstringresponseRequiredobjecttypeRequiredstringclientExtensionResultsRequiredunknownauthenticatorAttachmentRequiredstringResponse Body
curl -X POST "https://example.com/auth/passkeys/authenticate/verify" \
-H "Content-Type: application/json" \
-d '{
"id": "string",
"rawId": "string",
"response": {
"authenticatorData": "string",
"clientDataJSON": "string",
"signature": "string",
"userHandle": "string"
},
"type": "string",
"clientExtensionResults": null,
"authenticatorAttachment": "string"
}'const body = JSON.stringify({
"id": "string",
"rawId": "string",
"response": {
"authenticatorData": "string",
"clientDataJSON": "string",
"signature": "string",
"userHandle": "string"
},
"type": "string",
"clientExtensionResults": null,
"authenticatorAttachment": "string"
})
fetch("https://example.com/auth/passkeys/authenticate/verify", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/auth/passkeys/authenticate/verify"
body := strings.NewReader(`{
"id": "string",
"rawId": "string",
"response": {
"authenticatorData": "string",
"clientDataJSON": "string",
"signature": "string",
"userHandle": "string"
},
"type": "string",
"clientExtensionResults": null,
"authenticatorAttachment": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
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/auth/passkeys/authenticate/verify"
body = {
"id": "string",
"rawId": "string",
"response": {
"authenticatorData": "string",
"clientDataJSON": "string",
"signature": "string",
"userHandle": "string"
},
"type": "string",
"clientExtensionResults": null,
"authenticatorAttachment": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Empty
curl -X GET "https://example.com/auth/passkeys/"fetch("https://example.com/auth/passkeys/")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/auth/passkeys/"
req, _ := http.NewRequest("GET", url, nil)
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/auth/passkeys/"
response = requests.request("GET", url)
print(response.text)Empty
curl -X DELETE "https://example.com/auth/passkeys/string"fetch("https://example.com/auth/passkeys/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/auth/passkeys/string"
req, _ := http.NewRequest("DELETE", url, nil)
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/auth/passkeys/string"
response = requests.request("DELETE", url)
print(response.text)Empty
curl -X GET "https://example.com/auth/sessions/"fetch("https://example.com/auth/sessions/")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/auth/sessions/"
req, _ := http.NewRequest("GET", url, nil)
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/auth/sessions/"
response = requests.request("GET", url)
print(response.text)Empty
Post Auth Sessions
Sign in a user. Exchanges a passkey or one-time password for an authentication token.
Request Body
application/jsonRequiredmethodRequiredstringemailRequiredstringFormat:
"email"tokenRequiredstringResponse Body
curl -X POST "https://example.com/auth/sessions/" \
-H "Content-Type: application/json" \
-d '{
"method": "passkey",
"email": "user@example.com",
"token": "string"
}'const body = JSON.stringify({
"method": "passkey",
"email": "user@example.com",
"token": "string"
})
fetch("https://example.com/auth/sessions/", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/auth/sessions/"
body := strings.NewReader(`{
"method": "passkey",
"email": "user@example.com",
"token": "string"
}`)
req, _ := http.NewRequest("POST", url, body)
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/auth/sessions/"
body = {
"method": "passkey",
"email": "user@example.com",
"token": "string"
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text)Empty
curl -X DELETE "https://example.com/auth/sessions/"fetch("https://example.com/auth/sessions/")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/auth/sessions/"
req, _ := http.NewRequest("DELETE", url, nil)
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/auth/sessions/"
response = requests.request("DELETE", url)
print(response.text)Empty
curl -X GET "https://example.com/auth/sessions/current"fetch("https://example.com/auth/sessions/current")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/auth/sessions/current"
req, _ := http.NewRequest("GET", url, nil)
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/auth/sessions/current"
response = requests.request("GET", url)
print(response.text)Empty
curl -X GET "https://example.com/auth/sessions/current/permissions"fetch("https://example.com/auth/sessions/current/permissions")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/auth/sessions/current/permissions"
req, _ := http.NewRequest("GET", url, nil)
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/auth/sessions/current/permissions"
response = requests.request("GET", url)
print(response.text)Empty
curl -X DELETE "https://example.com/auth/sessions/string"fetch("https://example.com/auth/sessions/string")package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://example.com/auth/sessions/string"
req, _ := http.NewRequest("DELETE", url, nil)
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/auth/sessions/string"
response = requests.request("DELETE", url)
print(response.text)Empty