Revoke a service account API key
DELETE
https://example.com
/
api
/
api-keys
/
service-account
/
{id}
Revoke a service account API key
curl --request DELETE \
--url https://example.com/api/api-keys/service-account/{id} \
--cookie better-auth.session_token=const options = {method: 'DELETE', headers: {cookie: 'better-auth.session_token='}};
fetch('https://example.com/api/api-keys/service-account/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://example.com/api/api-keys/service-account/{id}"
headers = {"cookie": "better-auth.session_token="}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://example.com/api/api-keys/service-account/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cookie", "better-auth.session_token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}⌘I
Revoke a service account API key
curl --request DELETE \
--url https://example.com/api/api-keys/service-account/{id} \
--cookie better-auth.session_token=const options = {method: 'DELETE', headers: {cookie: 'better-auth.session_token='}};
fetch('https://example.com/api/api-keys/service-account/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://example.com/api/api-keys/service-account/{id}"
headers = {"cookie": "better-auth.session_token="}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://example.com/api/api-keys/service-account/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cookie", "better-auth.session_token=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"statusCode": 123,
"details": [
{
"message": "<string>",
"path": "<string>"
}
]
}
}