Start an OAuth authorization request (PKCE)
curl --request GET \
--url https://formhug.ai/api/v1/oauth/authorizeimport requests
url = "https://formhug.ai/api/v1/oauth/authorize"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://formhug.ai/api/v1/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://formhug.ai/api/v1/oauth/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://formhug.ai/api/v1/oauth/authorize"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://formhug.ai/api/v1/oauth/authorize")
.asString();require 'uri'
require 'net/http'
url = URI("https://formhug.ai/api/v1/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"error": "invalid_request",
"error_description": "Unknown client_id"
}OAuth
Start an OAuth authorization request (PKCE)
Start an OAuth 2.0 authorization request with PKCE (S256). The browser is redirected to the login page and ultimately back to the client redirect_uri with a code query parameter.
Start an OAuth authorization request (PKCE)
curl --request GET \
--url https://formhug.ai/api/v1/oauth/authorizeimport requests
url = "https://formhug.ai/api/v1/oauth/authorize"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://formhug.ai/api/v1/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://formhug.ai/api/v1/oauth/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://formhug.ai/api/v1/oauth/authorize"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://formhug.ai/api/v1/oauth/authorize")
.asString();require 'uri'
require 'net/http'
url = URI("https://formhug.ai/api/v1/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"error": "invalid_request",
"error_description": "Unknown client_id"
}Query Parameters
Must be on the client whitelist
PKCE code_challenge (S256)
Available options:
S256 Space-separated; defaults to the client default scope
Response
Redirect to the login page or to the client redirect_uri (with error)
Last modified on May 13, 2026
Was this page helpful?