curl --request GET \
--url https://app.demand-iq.com/api/auth/ssoimport requests
url = "https://app.demand-iq.com/api/auth/sso"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.demand-iq.com/api/auth/sso', 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://app.demand-iq.com/api/auth/sso",
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://app.demand-iq.com/api/auth/sso"
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://app.demand-iq.com/api/auth/sso")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/auth/sso")
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_bodyPortal SSO via auth code exchange
Exchanges a short-lived authorization code for an access token via the Core API, creates a new session, and redirects to the requested path. Used by the portal to embed AI Presentations in an iframe.
Flow:
- Exchange
codevia Core APIPOST /auth/code/exchange(Basic auth with SSO client credentials) - Validate the returned access token via
/user/meto get user/org info - Create a new session (always — never reuses an existing one)
- Set session cookie (plus embedded cookie if
embedded=1) - Revoke any prior session (best-effort)
- Redirect to a clean URL (no
codeparam in the final location)
Redirect URLs use the APP_URL environment variable as the canonical base origin when set. This is required for production deployments behind a load balancer where the internal hostname differs from the public URL.
curl --request GET \
--url https://app.demand-iq.com/api/auth/ssoimport requests
url = "https://app.demand-iq.com/api/auth/sso"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.demand-iq.com/api/auth/sso', 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://app.demand-iq.com/api/auth/sso",
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://app.demand-iq.com/api/auth/sso"
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://app.demand-iq.com/api/auth/sso")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.demand-iq.com/api/auth/sso")
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_bodyQuery Parameters
Short-lived authorization code issued by the portal
Internal path to redirect to after successful authentication
Set to 1 when running inside a portal iframe. Enables embedded mode cookies and error handling.
0, 1 Portal theme preference. When set, a theme cookie is stored so the initial render matches the portal appearance without a flash.
light, dark Response
Redirects to the redirect path on success, or to /login?error=sso_failed (standalone) / /embedded-auth-error (embedded) on failure. Returns a redirect on missing or invalid code, or Core API rejection.