Revoke a store connection
Programmatically revokes a store connection — deactivates the key pair and marks the session as disconnected. Use this when a merchant disconnects your application from their end (e.g. cancels their subscription on your platform).
Authentication: client_id and client_secret in the request body.
Note: Merchants can also disconnect your application at any time from their store’s Integrations → Developer → Connected Apps panel. Galactic Core handles that automatically — you do not need to call this endpoint for merchant-initiated disconnects.
Rate limit: 60 requests/hour per IP address.
curl --request POST \
--url https://api.tybritelabs.com/v1/connect/revoke \
--header 'Content-Type: application/json' \
--data '
{
"pair_id": "550e8400-e29b-41d4-a716-446655440000",
"client_id": "fantastic-storefront",
"client_secret": "YOUR_CLIENT_SECRET",
"revoke_reason": "user_disconnected"
}
'import requests
url = "https://api.tybritelabs.com/v1/connect/revoke"
payload = {
"pair_id": "550e8400-e29b-41d4-a716-446655440000",
"client_id": "fantastic-storefront",
"client_secret": "YOUR_CLIENT_SECRET",
"revoke_reason": "user_disconnected"
}
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({
pair_id: '550e8400-e29b-41d4-a716-446655440000',
client_id: 'fantastic-storefront',
client_secret: 'YOUR_CLIENT_SECRET',
revoke_reason: 'user_disconnected'
})
};
fetch('https://api.tybritelabs.com/v1/connect/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://api.tybritelabs.com/v1/connect/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([
'pair_id' => '550e8400-e29b-41d4-a716-446655440000',
'client_id' => 'fantastic-storefront',
'client_secret' => 'YOUR_CLIENT_SECRET',
'revoke_reason' => 'user_disconnected'
]),
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://api.tybritelabs.com/v1/connect/revoke"
payload := strings.NewReader("{\n \"pair_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"client_id\": \"fantastic-storefront\",\n \"client_secret\": \"YOUR_CLIENT_SECRET\",\n \"revoke_reason\": \"user_disconnected\"\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://api.tybritelabs.com/v1/connect/revoke")
.header("Content-Type", "application/json")
.body("{\n \"pair_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"client_id\": \"fantastic-storefront\",\n \"client_secret\": \"YOUR_CLIENT_SECRET\",\n \"revoke_reason\": \"user_disconnected\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tybritelabs.com/v1/connect/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 \"pair_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"client_id\": \"fantastic-storefront\",\n \"client_secret\": \"YOUR_CLIENT_SECRET\",\n \"revoke_reason\": \"user_disconnected\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"details": "The 'email' field is required"
}
}{
"error": {
"code": "invalid_client",
"message": "Invalid client credentials"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests for this API key. Please slow down and try again shortly.",
"remaining": 0,
"reset": 1706198400
}
}{
"error": {
"code": "server_error",
"message": "An unexpected error occurred"
}
}Body
The pair_id returned by POST /v1/connect/token.
"550e8400-e29b-41d4-a716-446655440000"
Your application's client identifier.
"fantastic-storefront"
Your application's client secret.
"YOUR_CLIENT_SECRET"
Optional reason for revocation. Recorded in the connection log.
Common values: user_disconnected, subscription_cancelled.
"user_disconnected"
curl --request POST \
--url https://api.tybritelabs.com/v1/connect/revoke \
--header 'Content-Type: application/json' \
--data '
{
"pair_id": "550e8400-e29b-41d4-a716-446655440000",
"client_id": "fantastic-storefront",
"client_secret": "YOUR_CLIENT_SECRET",
"revoke_reason": "user_disconnected"
}
'import requests
url = "https://api.tybritelabs.com/v1/connect/revoke"
payload = {
"pair_id": "550e8400-e29b-41d4-a716-446655440000",
"client_id": "fantastic-storefront",
"client_secret": "YOUR_CLIENT_SECRET",
"revoke_reason": "user_disconnected"
}
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({
pair_id: '550e8400-e29b-41d4-a716-446655440000',
client_id: 'fantastic-storefront',
client_secret: 'YOUR_CLIENT_SECRET',
revoke_reason: 'user_disconnected'
})
};
fetch('https://api.tybritelabs.com/v1/connect/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://api.tybritelabs.com/v1/connect/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([
'pair_id' => '550e8400-e29b-41d4-a716-446655440000',
'client_id' => 'fantastic-storefront',
'client_secret' => 'YOUR_CLIENT_SECRET',
'revoke_reason' => 'user_disconnected'
]),
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://api.tybritelabs.com/v1/connect/revoke"
payload := strings.NewReader("{\n \"pair_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"client_id\": \"fantastic-storefront\",\n \"client_secret\": \"YOUR_CLIENT_SECRET\",\n \"revoke_reason\": \"user_disconnected\"\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://api.tybritelabs.com/v1/connect/revoke")
.header("Content-Type", "application/json")
.body("{\n \"pair_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"client_id\": \"fantastic-storefront\",\n \"client_secret\": \"YOUR_CLIENT_SECRET\",\n \"revoke_reason\": \"user_disconnected\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tybritelabs.com/v1/connect/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 \"pair_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"client_id\": \"fantastic-storefront\",\n \"client_secret\": \"YOUR_CLIENT_SECRET\",\n \"revoke_reason\": \"user_disconnected\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"details": "The 'email' field is required"
}
}{
"error": {
"code": "invalid_client",
"message": "Invalid client credentials"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests for this API key. Please slow down and try again shortly.",
"remaining": 0,
"reset": 1706198400
}
}{
"error": {
"code": "server_error",
"message": "An unexpected error occurred"
}
}
