Endpoints
Revoke OAuth Token
Revokes an active OAuth access_token (blnk_live_... / blnk_test_...) or refresh_token (blnk_rt_...) in compliance with RFC 7009.
Once revoked, the token is immediately deleted and can no longer authenticate requests to /api/v1/*.
POST
/
api
/
oauth
/
revoke
Revoke OAuth Token
curl --request POST \
--url https://app.blink.store/api/oauth/revoke \
--header 'Content-Type: application/json' \
--data '
{
"token": "blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"client_id": "blnk_client_c35awnC5stJvE1aMvZYHMBpH",
"client_secret": "<string>"
}
'import requests
url = "https://app.blink.store/api/oauth/revoke"
payload = {
"token": "blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"client_id": "blnk_client_c35awnC5stJvE1aMvZYHMBpH",
"client_secret": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: 'blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0',
client_id: 'blnk_client_c35awnC5stJvE1aMvZYHMBpH',
client_secret: '<string>'
})
};
fetch('https://app.blink.store/api/oauth/revoke', 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://app.blink.store/api/oauth/revoke",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => 'blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0',
'client_id' => 'blnk_client_c35awnC5stJvE1aMvZYHMBpH',
'client_secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.blink.store/api/oauth/revoke"
payload := strings.NewReader("{\n \"token\": \"blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\",\n \"client_id\": \"blnk_client_c35awnC5stJvE1aMvZYHMBpH\",\n \"client_secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.blink.store/api/oauth/revoke")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\",\n \"client_id\": \"blnk_client_c35awnC5stJvE1aMvZYHMBpH\",\n \"client_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blink.store/api/oauth/revoke")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\",\n \"client_id\": \"blnk_client_c35awnC5stJvE1aMvZYHMBpH\",\n \"client_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"revoked": true
}{
"error": "invalid_grant",
"error_description": "Authorization code has expired"
}Body
application/jsonapplication/x-www-form-urlencoded
The access_token (blnk_live_...) or refresh_token (blnk_rt_...) to revoke.
Example:
"blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0"
Optional OAuth application client_id.
Example:
"blnk_client_c35awnC5stJvE1aMvZYHMBpH"
Optional OAuth application client_secret.
Response
Token revoked successfully.
Example:
true
⌘I
Revoke OAuth Token
curl --request POST \
--url https://app.blink.store/api/oauth/revoke \
--header 'Content-Type: application/json' \
--data '
{
"token": "blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"client_id": "blnk_client_c35awnC5stJvE1aMvZYHMBpH",
"client_secret": "<string>"
}
'import requests
url = "https://app.blink.store/api/oauth/revoke"
payload = {
"token": "blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
"client_id": "blnk_client_c35awnC5stJvE1aMvZYHMBpH",
"client_secret": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: 'blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0',
client_id: 'blnk_client_c35awnC5stJvE1aMvZYHMBpH',
client_secret: '<string>'
})
};
fetch('https://app.blink.store/api/oauth/revoke', 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://app.blink.store/api/oauth/revoke",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => 'blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0',
'client_id' => 'blnk_client_c35awnC5stJvE1aMvZYHMBpH',
'client_secret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.blink.store/api/oauth/revoke"
payload := strings.NewReader("{\n \"token\": \"blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\",\n \"client_id\": \"blnk_client_c35awnC5stJvE1aMvZYHMBpH\",\n \"client_secret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.blink.store/api/oauth/revoke")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\",\n \"client_id\": \"blnk_client_c35awnC5stJvE1aMvZYHMBpH\",\n \"client_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blink.store/api/oauth/revoke")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"blnk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\",\n \"client_id\": \"blnk_client_c35awnC5stJvE1aMvZYHMBpH\",\n \"client_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"revoked": true
}{
"error": "invalid_grant",
"error_description": "Authorization code has expired"
}