Authentication
Acs
SAML Assertion Consumer Service (ACS) endpoint.
Identity Provider POSTs the SAML assertion here after successful authentication.
POST
/
api
/
v1
/
auth
/
saml
/
acs
Acs
curl --request POST \
--url https://api.example.com/api/v1/auth/saml/acs \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'SAMLResponse=<string>' \
--data 'RelayState=<string>'import requests
url = "https://api.example.com/api/v1/auth/saml/acs"
payload = {
"SAMLResponse": "<string>",
"RelayState": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({SAMLResponse: '<string>', RelayState: '<string>'})
};
fetch('https://api.example.com/api/v1/auth/saml/acs', 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.example.com/api/v1/auth/saml/acs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/auth/saml/acs"
payload := strings.NewReader("SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/auth/saml/acs")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/auth/saml/acs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"token": "<string>",
"refresh_token": "<string>",
"expires_in": 123,
"account": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"user": {
"id": "<string>",
"email": "<string>",
"role": "<string>",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z"
},
"is_new_user": true,
"is_new_account": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Response
Successful Response
Response for successful OAuth callback authentication.
JWT access token
JWT refresh token
Access token expiration time in seconds
Account information
Show child attributes
Show child attributes
User information
Show child attributes
Show child attributes
Whether a new user was created
Whether a new account was created
Previous
MetadataDownload SAML Service Provider Metadata XML.
Used to configure the Identity Provider to recognize this SP.
Returns:
XML content with Content-Disposition attachment.
Next
⌘I
Acs
curl --request POST \
--url https://api.example.com/api/v1/auth/saml/acs \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'SAMLResponse=<string>' \
--data 'RelayState=<string>'import requests
url = "https://api.example.com/api/v1/auth/saml/acs"
payload = {
"SAMLResponse": "<string>",
"RelayState": "<string>"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({SAMLResponse: '<string>', RelayState: '<string>'})
};
fetch('https://api.example.com/api/v1/auth/saml/acs', 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.example.com/api/v1/auth/saml/acs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/auth/saml/acs"
payload := strings.NewReader("SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/auth/saml/acs")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/auth/saml/acs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "SAMLResponse=%3Cstring%3E&RelayState=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"token": "<string>",
"refresh_token": "<string>",
"expires_in": 123,
"account": {
"id": "<string>",
"slug": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"user": {
"id": "<string>",
"email": "<string>",
"role": "<string>",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z"
},
"is_new_user": true,
"is_new_account": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}