Get configuration
curl --request GET \
--url https://accounts.livechat.com/v2/organizations/my/saml \
--header 'Authorization: Bearer <token>'import requests
url = "https://accounts.livechat.com/v2/organizations/my/saml"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://accounts.livechat.com/v2/organizations/my/saml', 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://accounts.livechat.com/v2/organizations/my/saml",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://accounts.livechat.com/v2/organizations/my/saml"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://accounts.livechat.com/v2/organizations/my/saml")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://accounts.livechat.com/v2/organizations/my/saml")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"entrypoint": "https://accounts.example.com/saml2/idp/SSOService.php",
"certificate": "-----BEGIN CERTIFICATE-----\nMIIDXTCCAkWgAwIBAgIJALmVVuDWu4NYMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\n-----END CERTIFICATE-----",
"idp_entity_id": "https://accounts.example.com/saml2/idp/metadata.php",
"sp_entity_id": "https://accounts.livechat.com/saml/metadata",
"active": false,
"version": 2
}{
"error": "bad_request",
"error_description": "The server cannot or will not process the request due to an apparent client error (for example, malformed request syntax, size too large).",
"request_id": "5903c51b-89f0-41a9-a25d-4f39af100353"
}{
"error": "resource_not_found",
"error_description": "The requested resource couldn't be found.",
"resource_name": "account",
"resource_id": "def31e95-5ca4-4817-b176-732e4544daca",
"request_id": "5903c51b-89f0-41a9-a25d-4f39af100353"
}{
"error": "invalid_request",
"error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",
"invalid_fields": {
"email": "invalid email address"
},
"request_id": "5903c51b-89f0-41a9-a25d-4f39af100353"
}{
"error": "server_error",
"error_description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
"request_id": "5903c51b-89f0-41a9-a25d-4f39af100353"
}SAML
Get configuration
Returns the SAML configuration for the organization.
GET
/
organizations
/
my
/
saml
Get configuration
curl --request GET \
--url https://accounts.livechat.com/v2/organizations/my/saml \
--header 'Authorization: Bearer <token>'import requests
url = "https://accounts.livechat.com/v2/organizations/my/saml"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://accounts.livechat.com/v2/organizations/my/saml', 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://accounts.livechat.com/v2/organizations/my/saml",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://accounts.livechat.com/v2/organizations/my/saml"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://accounts.livechat.com/v2/organizations/my/saml")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://accounts.livechat.com/v2/organizations/my/saml")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"entrypoint": "https://accounts.example.com/saml2/idp/SSOService.php",
"certificate": "-----BEGIN CERTIFICATE-----\nMIIDXTCCAkWgAwIBAgIJALmVVuDWu4NYMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\n-----END CERTIFICATE-----",
"idp_entity_id": "https://accounts.example.com/saml2/idp/metadata.php",
"sp_entity_id": "https://accounts.livechat.com/saml/metadata",
"active": false,
"version": 2
}{
"error": "bad_request",
"error_description": "The server cannot or will not process the request due to an apparent client error (for example, malformed request syntax, size too large).",
"request_id": "5903c51b-89f0-41a9-a25d-4f39af100353"
}{
"error": "resource_not_found",
"error_description": "The requested resource couldn't be found.",
"resource_name": "account",
"resource_id": "def31e95-5ca4-4817-b176-732e4544daca",
"request_id": "5903c51b-89f0-41a9-a25d-4f39af100353"
}{
"error": "invalid_request",
"error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",
"invalid_fields": {
"email": "invalid email address"
},
"request_id": "5903c51b-89f0-41a9-a25d-4f39af100353"
}{
"error": "server_error",
"error_description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
"request_id": "5903c51b-89f0-41a9-a25d-4f39af100353"
}Authorizations
This API uses OAuth2 with the implicit grant flow. Learn about the implicit grant flow.
Response
OK: Returns organization SAML configuration.
The organization's SAML configuration.
The entrypoint URL of the identity provider; SSO redirects the AuthnRequest there.
The SAML certificate configured on the IDP side in PEM format.
The entity ID of the external identity provider; usually a URL.
The entity ID of Text Accounts; it has a default value that can be changed.
If true: the SAML configuration is enabled.
The version of the SAML configuration; currently either 1 or 2.
Was this page helpful?
⌘I