Authorization Endpoint
curl --request GET \
--url https://api.headlesscommerce.io/v1/oauth/authorizeimport requests
url = "https://api.headlesscommerce.io/v1/oauth/authorize"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.headlesscommerce.io/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://api.headlesscommerce.io/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://api.headlesscommerce.io/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://api.headlesscommerce.io/v1/oauth/authorize")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.headlesscommerce.io/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"<string>"{
"error": "<string>",
"error_description": "<string>"
}OAuth 2.1
Authorization Endpoint
Starts the OAuth 2.1 Authorization Code flow with PKCE.
Renders a login and consent form. After the user authenticates
and selects a store, the browser is redirected to redirect_uri
with an authorization code and state.
GET
/
oauth
/
authorize
Authorization Endpoint
curl --request GET \
--url https://api.headlesscommerce.io/v1/oauth/authorizeimport requests
url = "https://api.headlesscommerce.io/v1/oauth/authorize"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.headlesscommerce.io/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://api.headlesscommerce.io/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://api.headlesscommerce.io/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://api.headlesscommerce.io/v1/oauth/authorize")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.headlesscommerce.io/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"<string>"{
"error": "<string>",
"error_description": "<string>"
}Query Parameters
OAuth client identifier from /oauth/register
Registered redirect URI
Must be code
Available options:
code Space-separated scopes (e.g. products:read orders:write)
Opaque CSRF token returned in the redirect
PKCE code challenge (Base64-URL of SHA-256 hash)
Available options:
S256 Response
HTML login/consent form
The response is of type string.
⌘I