OAuth approve
curl --request POST \
--url https://vitalog-api.example.com/oauth/approve \
--header 'Content-Type: application/json' \
--header 'Origin: <origin>' \
--cookie __Secure-vitalog-oauth= \
--data '
{
"csrf_token": "<string>",
"action": "allow",
"email": "jsmith@example.com",
"password": "<string>"
}
'import requests
url = "https://vitalog-api.example.com/oauth/approve"
payload = {
"csrf_token": "<string>",
"action": "allow",
"email": "jsmith@example.com",
"password": "<string>"
}
headers = {
"cookie": "__Secure-vitalog-oauth=",
"Origin": "<origin>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Secure-vitalog-oauth=',
Origin: '<origin>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
csrf_token: '<string>',
action: 'allow',
email: 'jsmith@example.com',
password: '<string>'
})
};
fetch('https://vitalog-api.example.com/oauth/approve', 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://vitalog-api.example.com/oauth/approve",
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([
'csrf_token' => '<string>',
'action' => 'allow',
'email' => 'jsmith@example.com',
'password' => '<string>'
]),
CURLOPT_COOKIE => "__Secure-vitalog-oauth=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Origin: <origin>"
],
]);
$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://vitalog-api.example.com/oauth/approve"
payload := strings.NewReader("{\n \"csrf_token\": \"<string>\",\n \"action\": \"allow\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Secure-vitalog-oauth=")
req.Header.Add("Origin", "<origin>")
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://vitalog-api.example.com/oauth/approve")
.header("cookie", "__Secure-vitalog-oauth=")
.header("Origin", "<origin>")
.header("Content-Type", "application/json")
.body("{\n \"csrf_token\": \"<string>\",\n \"action\": \"allow\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitalog-api.example.com/oauth/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Secure-vitalog-oauth='
request["Origin"] = '<origin>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"csrf_token\": \"<string>\",\n \"action\": \"allow\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"redirect_to": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}OAuth approve
Requires the flow cookie, exact UI_BASE_URL Origin header and matching CSRF token. Allow signs in with ROOT_EMAIL and ROOT_PASSWORD in the JSON body and authorizes the requested scopes. Cancel does not need credentials. Returns the client-bound callback containing iss and the original state when supplied; approval includes a single-use five-minute code. No API key or access token is created until code exchange.
POST
/
oauth
/
approve
OAuth approve
curl --request POST \
--url https://vitalog-api.example.com/oauth/approve \
--header 'Content-Type: application/json' \
--header 'Origin: <origin>' \
--cookie __Secure-vitalog-oauth= \
--data '
{
"csrf_token": "<string>",
"action": "allow",
"email": "jsmith@example.com",
"password": "<string>"
}
'import requests
url = "https://vitalog-api.example.com/oauth/approve"
payload = {
"csrf_token": "<string>",
"action": "allow",
"email": "jsmith@example.com",
"password": "<string>"
}
headers = {
"cookie": "__Secure-vitalog-oauth=",
"Origin": "<origin>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: '__Secure-vitalog-oauth=',
Origin: '<origin>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
csrf_token: '<string>',
action: 'allow',
email: 'jsmith@example.com',
password: '<string>'
})
};
fetch('https://vitalog-api.example.com/oauth/approve', 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://vitalog-api.example.com/oauth/approve",
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([
'csrf_token' => '<string>',
'action' => 'allow',
'email' => 'jsmith@example.com',
'password' => '<string>'
]),
CURLOPT_COOKIE => "__Secure-vitalog-oauth=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Origin: <origin>"
],
]);
$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://vitalog-api.example.com/oauth/approve"
payload := strings.NewReader("{\n \"csrf_token\": \"<string>\",\n \"action\": \"allow\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Secure-vitalog-oauth=")
req.Header.Add("Origin", "<origin>")
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://vitalog-api.example.com/oauth/approve")
.header("cookie", "__Secure-vitalog-oauth=")
.header("Origin", "<origin>")
.header("Content-Type", "application/json")
.body("{\n \"csrf_token\": \"<string>\",\n \"action\": \"allow\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vitalog-api.example.com/oauth/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Secure-vitalog-oauth='
request["Origin"] = '<origin>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"csrf_token\": \"<string>\",\n \"action\": \"allow\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"redirect_to": "<string>"
}{
"error": "<string>",
"error_description": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"catalog_version": "<string>",
"issues": [
{
"path": "<string>",
"reason": "<string>",
"message": "<string>",
"suggested_keys": [
"<string>"
],
"discovery": {}
}
],
"existing_id": "<string>",
"current_version": 123,
"current_catalog_version": "<string>"
}Authorizations
Signed HttpOnly consent-flow cookie from /oauth/authorize, valid for five minutes. Loopback development uses vitalog-oauth.
Headers
Body
application/json
- Option 1
- Option 2
Pattern:
^[A-Za-z0-9_-]{43}$Allowed value:
"allow"Maximum string length:
254Pattern:
^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Minimum string length:
1Response
Validated MCP client callback URL; no API key is returned
Was this page helpful?
