Set
curl --request PUT \
--url https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"check_breach_on_creation": true,
"check_breach_on_authentication": true,
"validate_on_authentication": true,
"luds_min_password_length": 123,
"luds_min_password_complexity": 123
}
'import requests
url = "https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config"
payload = {
"check_breach_on_creation": True,
"check_breach_on_authentication": True,
"validate_on_authentication": True,
"luds_min_password_length": 123,
"luds_min_password_complexity": 123
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
check_breach_on_creation: true,
check_breach_on_authentication: true,
validate_on_authentication: true,
luds_min_password_length: 123,
luds_min_password_complexity: 123
})
};
fetch('https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config', 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://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'check_breach_on_creation' => true,
'check_breach_on_authentication' => true,
'validate_on_authentication' => true,
'luds_min_password_length' => 123,
'luds_min_password_complexity' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config"
payload := strings.NewReader("{\n \"check_breach_on_creation\": true,\n \"check_breach_on_authentication\": true,\n \"validate_on_authentication\": true,\n \"luds_min_password_length\": 123,\n \"luds_min_password_complexity\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"check_breach_on_creation\": true,\n \"check_breach_on_authentication\": true,\n \"validate_on_authentication\": true,\n \"luds_min_password_length\": 123,\n \"luds_min_password_complexity\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"check_breach_on_creation\": true,\n \"check_breach_on_authentication\": true,\n \"validate_on_authentication\": true,\n \"luds_min_password_length\": 123,\n \"luds_min_password_complexity\": 123\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"password_strength_config": {
"check_breach_on_creation": true,
"check_breach_on_authentication": true,
"validate_on_authentication": true,
"luds_min_password_length": 123,
"luds_min_password_complexity": 123
},
"status_code": 123
}{
"status_code": 401,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "unauthorized_credentials",
"error_message": "Unauthorized credentials.",
"error_url": "https://stytch.com/docs/api/errors/401"
}{
"status_code": 429,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "too_many_requests",
"error_message": "Too many requests have been made.",
"error_url": "https://stytch.com/docs/api/errors/429"
}{
"status_code": 500,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "internal_server_error",
"error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
"error_url": "https://stytch.com/docs/api/errors/500"
}Password Strength Configuration
Set Password Strength Configuration
Set updates the password strength configuration for an environment.
PUT
/
pwa
/
v3
/
projects
/
:project_slug
/
environments
/
:environment_slug
/
password_strength_config
Set
curl --request PUT \
--url https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"check_breach_on_creation": true,
"check_breach_on_authentication": true,
"validate_on_authentication": true,
"luds_min_password_length": 123,
"luds_min_password_complexity": 123
}
'import requests
url = "https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config"
payload = {
"check_breach_on_creation": True,
"check_breach_on_authentication": True,
"validate_on_authentication": True,
"luds_min_password_length": 123,
"luds_min_password_complexity": 123
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
check_breach_on_creation: true,
check_breach_on_authentication: true,
validate_on_authentication: true,
luds_min_password_length: 123,
luds_min_password_complexity: 123
})
};
fetch('https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config', 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://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'check_breach_on_creation' => true,
'check_breach_on_authentication' => true,
'validate_on_authentication' => true,
'luds_min_password_length' => 123,
'luds_min_password_complexity' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config"
payload := strings.NewReader("{\n \"check_breach_on_creation\": true,\n \"check_breach_on_authentication\": true,\n \"validate_on_authentication\": true,\n \"luds_min_password_length\": 123,\n \"luds_min_password_complexity\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"check_breach_on_creation\": true,\n \"check_breach_on_authentication\": true,\n \"validate_on_authentication\": true,\n \"luds_min_password_length\": 123,\n \"luds_min_password_complexity\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://management.stytch.com/pwa/v3/projects/:project_slug/environments/:environment_slug/password_strength_config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"check_breach_on_creation\": true,\n \"check_breach_on_authentication\": true,\n \"validate_on_authentication\": true,\n \"luds_min_password_length\": 123,\n \"luds_min_password_complexity\": 123\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"password_strength_config": {
"check_breach_on_creation": true,
"check_breach_on_authentication": true,
"validate_on_authentication": true,
"luds_min_password_length": 123,
"luds_min_password_complexity": 123
},
"status_code": 123
}{
"status_code": 401,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "unauthorized_credentials",
"error_message": "Unauthorized credentials.",
"error_url": "https://stytch.com/docs/api/errors/401"
}{
"status_code": 429,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "too_many_requests",
"error_message": "Too many requests have been made.",
"error_url": "https://stytch.com/docs/api/errors/429"
}{
"status_code": 500,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"error_type": "internal_server_error",
"error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
"error_url": "https://stytch.com/docs/api/errors/500"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
⌘I