Revoke API key
curl --request DELETE \
--url https://fanifyai.com/api/v1/hub/keys/{id} \
--header 'X-Requested-With: <x-requested-with>' \
--cookie .AspNetCore.Cookies=import requests
url = "https://fanifyai.com/api/v1/hub/keys/{id}"
headers = {
"cookie": ".AspNetCore.Cookies=",
"X-Requested-With": "<x-requested-with>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {cookie: '.AspNetCore.Cookies=', 'X-Requested-With': '<x-requested-with>'}
};
fetch('https://fanifyai.com/api/v1/hub/keys/{id}', 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://fanifyai.com/api/v1/hub/keys/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_COOKIE => ".AspNetCore.Cookies=",
CURLOPT_HTTPHEADER => [
"X-Requested-With: <x-requested-with>"
],
]);
$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://fanifyai.com/api/v1/hub/keys/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cookie", ".AspNetCore.Cookies=")
req.Header.Add("X-Requested-With", "<x-requested-with>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://fanifyai.com/api/v1/hub/keys/{id}")
.header("cookie", ".AspNetCore.Cookies=")
.header("X-Requested-With", "<x-requested-with>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fanifyai.com/api/v1/hub/keys/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["cookie"] = '.AspNetCore.Cookies='
request["X-Requested-With"] = '<x-requested-with>'
response = http.request(request)
puts response.read_body{
"type": "https://fanifyai.com/docs/hub/errors#unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized"
}{
"type": "https://fanifyai.com/docs/hub/errors#resource_not_found",
"title": "Resource not found",
"status": 404,
"code": "resource_not_found"
}{
"type": "https://fanifyai.com/docs/hub/errors#rate_limited",
"title": "Rate limit reached",
"status": 429,
"code": "rate_limited"
}API keys
Revoke API key
Revokes an API key so it can no longer authenticate requests.
DELETE
/
api
/
v1
/
hub
/
keys
/
{id}
Revoke API key
curl --request DELETE \
--url https://fanifyai.com/api/v1/hub/keys/{id} \
--header 'X-Requested-With: <x-requested-with>' \
--cookie .AspNetCore.Cookies=import requests
url = "https://fanifyai.com/api/v1/hub/keys/{id}"
headers = {
"cookie": ".AspNetCore.Cookies=",
"X-Requested-With": "<x-requested-with>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {cookie: '.AspNetCore.Cookies=', 'X-Requested-With': '<x-requested-with>'}
};
fetch('https://fanifyai.com/api/v1/hub/keys/{id}', 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://fanifyai.com/api/v1/hub/keys/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_COOKIE => ".AspNetCore.Cookies=",
CURLOPT_HTTPHEADER => [
"X-Requested-With: <x-requested-with>"
],
]);
$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://fanifyai.com/api/v1/hub/keys/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("cookie", ".AspNetCore.Cookies=")
req.Header.Add("X-Requested-With", "<x-requested-with>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://fanifyai.com/api/v1/hub/keys/{id}")
.header("cookie", ".AspNetCore.Cookies=")
.header("X-Requested-With", "<x-requested-with>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fanifyai.com/api/v1/hub/keys/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["cookie"] = '.AspNetCore.Cookies='
request["X-Requested-With"] = '<x-requested-with>'
response = http.request(request)
puts response.read_body{
"type": "https://fanifyai.com/docs/hub/errors#unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized"
}{
"type": "https://fanifyai.com/docs/hub/errors#resource_not_found",
"title": "Resource not found",
"status": 404,
"code": "resource_not_found"
}{
"type": "https://fanifyai.com/docs/hub/errors#rate_limited",
"title": "Rate limit reached",
"status": 429,
"code": "rate_limited"
}Was this page helpful?
