Skip to main content
Start an OAuth authorization request (PKCE)
curl --request GET \
  --url https://formhug.ai/api/v1/oauth/authorize
import 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

client_id
string
required
redirect_uri
string
required

Must be on the client whitelist

code_challenge
string
required

PKCE code_challenge (S256)

code_challenge_method
enum<string>
required
Available options:
S256
scope
string

Space-separated; defaults to the client default scope

state
string

Response

Redirect to the login page or to the client redirect_uri (with error)

Last modified on May 13, 2026