Content
Begin content-source OAuth flow
Generate an OAuth authorization URL for a Notion or Google content source.
GET
/
api
/
content
/
sources
/
oauth
/
authorize
Begin content-source OAuth flow
curl --request GET \
--url https://api.tedro.io/api/content/sources/oauth/authorize \
--header 'x-workspace-id: <api-key>' \
--cookie better-auth.session_token=import requests
url = "https://api.tedro.io/api/content/sources/oauth/authorize"
headers = {
"cookie": "better-auth.session_token=",
"x-workspace-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {cookie: 'better-auth.session_token=', 'x-workspace-id': '<api-key>'}
};
fetch('https://api.tedro.io/api/content/sources/oauth/authorize', 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.tedro.io/api/content/sources/oauth/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"x-workspace-id: <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://api.tedro.io/api/content/sources/oauth/authorize"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "better-auth.session_token=")
req.Header.Add("x-workspace-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tedro.io/api/content/sources/oauth/authorize")
.header("cookie", "better-auth.session_token=")
.header("x-workspace-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tedro.io/api/content/sources/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'better-auth.session_token='
request["x-workspace-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"authorizationUrl": "<string>"
}{
"error": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Session cookie set by Better Auth on sign-in.
Workspace UUID. Required on all /api/* endpoints.
Query Parameters
Content-source OAuth provider
Available options:
notion, google_content Response
Authorization URL
Previous
List Notion pages for sourceList accessible Notion pages for a connected Notion content source.
Next
⌘I
Begin content-source OAuth flow
curl --request GET \
--url https://api.tedro.io/api/content/sources/oauth/authorize \
--header 'x-workspace-id: <api-key>' \
--cookie better-auth.session_token=import requests
url = "https://api.tedro.io/api/content/sources/oauth/authorize"
headers = {
"cookie": "better-auth.session_token=",
"x-workspace-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {cookie: 'better-auth.session_token=', 'x-workspace-id': '<api-key>'}
};
fetch('https://api.tedro.io/api/content/sources/oauth/authorize', 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.tedro.io/api/content/sources/oauth/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"x-workspace-id: <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://api.tedro.io/api/content/sources/oauth/authorize"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "better-auth.session_token=")
req.Header.Add("x-workspace-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tedro.io/api/content/sources/oauth/authorize")
.header("cookie", "better-auth.session_token=")
.header("x-workspace-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tedro.io/api/content/sources/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'better-auth.session_token='
request["x-workspace-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"authorizationUrl": "<string>"
}{
"error": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}