_First, we create a dedicated user sitemap-generator + role sitemap-generator. This user only sees the pages that are public and should also be included in the sitemap. The user receives a secure password and active 2FA protection. We also activate the sitemap-generator-api-token API token for the user via the admin account. We also set the following read permissions for the user, including the System access API authorization.
$opts = [
'http' => [
'header' => "Authorization: Token {$clientId}:{$clientSecret}"
],
'ssl' => [
'verify_peer' => false,
'allow_self_signed'=> true ]
];
maybe its worth to add this as export BS_INSECURE or similar, to allow requests to untrusted certs
]]>