API Key - Revoke
curl --request DELETE \
--url https://sandbox.birrpay.io/v2/api-keys/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://sandbox.birrpay.io/v2/api-keys/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://sandbox.birrpay.io/v2/api-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://sandbox.birrpay.io/v2/api-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_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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://sandbox.birrpay.io/v2/api-keys/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sandbox.birrpay.io/v2/api-keys/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/v2/api-keys/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"merchant_id": "y3oqhf46pyzuxjbcn2giaqnb44",
"key_id": "5hEEqkgJUyuxgSKGArHA4mWSnX",
"revoked": "true"
}API Key
API Key - Revoke
Revoke the specified API Key. Once revoked, the API Key can no longer be used for authenticating with our APIs.
DELETE
/
v2
/
api-keys
/
{id}
API Key - Revoke
curl --request DELETE \
--url https://sandbox.birrpay.io/v2/api-keys/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://sandbox.birrpay.io/v2/api-keys/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://sandbox.birrpay.io/v2/api-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://sandbox.birrpay.io/v2/api-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_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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://sandbox.birrpay.io/v2/api-keys/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://sandbox.birrpay.io/v2/api-keys/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.birrpay.io/v2/api-keys/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"merchant_id": "y3oqhf46pyzuxjbcn2giaqnb44",
"key_id": "5hEEqkgJUyuxgSKGArHA4mWSnX",
"revoked": "true"
}Authorizations
Format: admin-api-key=<admin-api-key>
Admin API keys allow you to perform some privileged actions such as creating a merchant account and Connector account. This is only used during development.
Path Parameters
The unique identifier for the API Key
Response
API Key revoked
The response body for revoking an API Key.
The identifier for the Merchant Account.
Maximum string length:
64Example:
"y3oqhf46pyzuxjbcn2giaqnb44"
The identifier for the API Key.
Maximum string length:
64Example:
"5hEEqkgJUyuxgSKGArHA4mWSnX"
Indicates whether the API key was revoked or not.
Example:
"true"