Bearer token from environment
20-http-bearer-env.yaml
HTTP(S)
What this example does
This example demonstrates bearer token from environment.
Checks and behavior
- Sends an GET request to https://api.example.invalid/private.
- Checks allowed/denied HTTP status codes.
- TLS settings cover certificate trust.
Adapt example domains, addresses, credentials and thresholds to your environment before use.
YAML configuration
# Copyright (c) 2026 mati peterson. Maintainer: mati peterson <ipsonic@mailbox.org>. Project: https://ipsonic.com/probe/. Disclaimer: Provided AS IS, without warranty of any kind. Use at your own risk; validate checks and configurations before production use.
name: Bearer token from environment
url: https://api.example.invalid/private
request:
method: GET
auth:
type: bearer
token_env: HTTPTEST_API_TOKEN
tls:
verify: true
tests:
status:
allow: [200]